@willbooster/tree-sitter-c 15.0.0 → 15.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/grammar.js +13 -7
- package/package.json +1 -1
- package/tree-sitter-c.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -194,6 +194,9 @@ module.exports = Object.assign(
|
|
|
194
194
|
extras: ($) => [$.pragma_operator, /\s|\\(?:\r\n?|\n\r?)/, $.comment],
|
|
195
195
|
|
|
196
196
|
inline: ($) => [
|
|
197
|
+
$._unattributed_non_case_statement,
|
|
198
|
+
$._single_unattributed_non_case_statement,
|
|
199
|
+
$._unlabeled_non_case_statement,
|
|
197
200
|
$._non_identifier_type_specifier,
|
|
198
201
|
$._non_macro_declaration_modifiers,
|
|
199
202
|
$._unattributed_declarator,
|
|
@@ -211,9 +214,9 @@ module.exports = Object.assign(
|
|
|
211
214
|
$.statement,
|
|
212
215
|
$._single_noncompound_statement,
|
|
213
216
|
$._non_case_statement,
|
|
214
|
-
$.
|
|
217
|
+
$._attributed_body_statement,
|
|
215
218
|
$._single_non_case_statement,
|
|
216
|
-
$.
|
|
219
|
+
$._single_attributed_body_statement,
|
|
217
220
|
$._case_body_statement,
|
|
218
221
|
$._case_body_unattributed_statement,
|
|
219
222
|
$._case_label_tail,
|
|
@@ -1080,12 +1083,13 @@ module.exports = Object.assign(
|
|
|
1080
1083
|
),
|
|
1081
1084
|
|
|
1082
1085
|
attributed_statement: ($) =>
|
|
1083
|
-
seq(repeat1($.attribute_declaration), alias($.
|
|
1086
|
+
seq(repeat1($.attribute_declaration), alias($._attributed_body_statement, $.statement)),
|
|
1087
|
+
|
|
1088
|
+
_attributed_body_statement: ($) => $._unattributed_non_case_statement,
|
|
1084
1089
|
|
|
1085
1090
|
statement: ($) => choice($.case_statement, alias($._non_case_statement, $.statement)),
|
|
1086
1091
|
|
|
1087
|
-
_non_case_statement: ($) =>
|
|
1088
|
-
choice($.attributed_statement, alias($._unattributed_non_case_statement, $.statement)),
|
|
1092
|
+
_non_case_statement: ($) => choice($.attributed_statement, $._unattributed_non_case_statement),
|
|
1089
1093
|
|
|
1090
1094
|
_unattributed_non_case_statement: ($) => choice($.labeled_statement, $._unlabeled_non_case_statement),
|
|
1091
1095
|
|
|
@@ -1158,7 +1162,7 @@ module.exports = Object.assign(
|
|
|
1158
1162
|
|
|
1159
1163
|
_single_non_case_statement: ($) =>
|
|
1160
1164
|
choice(
|
|
1161
|
-
|
|
1165
|
+
$._single_unattributed_non_case_statement,
|
|
1162
1166
|
alias($._single_attributed_statement, $.attributed_statement)
|
|
1163
1167
|
),
|
|
1164
1168
|
|
|
@@ -1214,9 +1218,11 @@ module.exports = Object.assign(
|
|
|
1214
1218
|
_single_attributed_statement: ($) =>
|
|
1215
1219
|
seq(
|
|
1216
1220
|
repeat1($.attribute_declaration),
|
|
1217
|
-
choice($.compound_statement, alias($.
|
|
1221
|
+
choice($.compound_statement, alias($._single_attributed_body_statement, $.statement))
|
|
1218
1222
|
),
|
|
1219
1223
|
|
|
1224
|
+
_single_attributed_body_statement: ($) => $._single_unattributed_non_case_statement,
|
|
1225
|
+
|
|
1220
1226
|
case_statement: ($) =>
|
|
1221
1227
|
prec.dynamic(
|
|
1222
1228
|
1,
|
package/package.json
CHANGED
package/tree-sitter-c.wasm
CHANGED
|
Binary file
|