@willbooster/tree-sitter-c 18.0.0 → 18.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 CHANGED
@@ -71,11 +71,50 @@ module.exports = Object.assign(
71
71
  name: 'c',
72
72
 
73
73
  conflicts: ($) => [
74
+ [
75
+ $._conditional_function_specifiers,
76
+ $._declaration_specifiers,
77
+ $._empty_declaration,
78
+ $._statement_empty_declaration,
79
+ ],
80
+ [$._empty_declaration, $._statement_empty_declaration],
81
+ [
82
+ $.declaration,
83
+ $.type_definition,
84
+ $._macro_declaration_specifiers,
85
+ $._declaration_modifiers,
86
+ $._statement_empty_declaration,
87
+ ],
88
+ [$._macro_declaration_specifiers, $._declaration_modifiers, $._empty_declaration, $._statement_empty_declaration],
89
+ [$._conditional_function_specifiers, $._declaration_specifiers, $._statement_empty_declaration],
90
+ [$._macro_declaration_specifiers, $._declaration_modifiers, $._statement_empty_declaration],
91
+ [$.macro_specifier, $._type_name_specifier],
92
+ [$._type_name_specifier, $.expression, $.va_arg_expression, $.macro_type_specifier],
93
+ [$._type_name_specifier, $.expression],
94
+ [$._type_name_specifier, $.expression, $.macro_type_specifier],
95
+ [$._type_name_specifier, $.macro_type_specifier],
96
+ [$._type_name_specifier, $._sized_type_name],
97
+ [$._type_name_specifier, $._sized_bit_int_type_name],
98
+ [$._sized_type_name],
99
+ [$._sized_bit_int_type_name],
100
+ [$._sized_type_name, $._sized_bit_int_type_name],
101
+ [$.storage_class_specifier, $._type_name_specifier],
102
+ [$._compound_literal_storage_class_specifier, $._type_name_specifier],
103
+ [$._field_declaration_specifiers],
104
+ [$._sized_type_identifier, $._enum_underlying_type],
105
+ [$.type_specifier, $._sized_type_identifier, $.macro_specifier],
106
+ [$.type_specifier, $._sized_type_identifier],
107
+ [$._sized_type_identifier, $.macro_specifier],
74
108
  [$._declaration_modifiers, $._empty_declaration],
75
109
  [$._statement_declaration, $._statement_declaration_modifiers],
76
110
  [$.declaration, $._declaration_modifiers],
77
111
  [$._statement_declaration, $._statement_type_definition, $._statement_declaration_modifiers],
78
- [$.declaration, $.type_definition, $._macro_declaration_specifiers, $._declaration_modifiers],
112
+ [
113
+ $._statement_declaration,
114
+ $._statement_type_definition,
115
+ $._statement_declaration_modifiers,
116
+ $._statement_empty_declaration,
117
+ ],
79
118
  [$.type_definition, $.type_specifier],
80
119
  [$.type_definition, $._macro_declaration_specifiers],
81
120
  [$._macro_declaration_specifiers, $._declaration_modifiers, $.attributed_statement, $.case_statement],
@@ -86,14 +125,22 @@ module.exports = Object.assign(
86
125
  [$.macro_specifier, $._declarator],
87
126
  [$.macro_specifier, $._declarator, $.attributed_declarator, $.type_specifier],
88
127
  [$.macro_specifier, $._declarator, $.attributed_declarator],
89
- [$.macro_specifier, $.sized_type_specifier],
90
- [$.macro_specifier, $.type_specifier, $.sized_type_specifier],
128
+ [$._macro_declaration_specifiers, $.type_specifier, $.sized_type_specifier],
129
+ [$.type_definition, $._macro_declaration_specifiers, $.type_specifier, $.sized_type_specifier],
130
+ [$._macro_declaration_specifiers, $.type_specifier, $._sized_bit_int_specifier],
131
+ [$.type_definition, $._macro_declaration_specifiers, $.type_specifier, $._sized_bit_int_specifier],
132
+ [$._statement_type_definition, $.type_specifier, $.sized_type_specifier],
133
+ [$._statement_type_definition, $.type_specifier, $._sized_bit_int_specifier],
134
+ [$._macro_declaration_specifiers, $.sized_type_specifier],
135
+ [$.type_definition, $._macro_declaration_specifiers, $.sized_type_specifier],
136
+ [$.type_definition, $.type_specifier, $.sized_type_specifier],
137
+ [$.type_definition, $.type_specifier, $._sized_bit_int_specifier],
138
+ [$._type_declarator, $.sized_type_specifier],
91
139
  [$.macro_specifier, $.expression],
92
140
  [$.macro_specifier, $.type_specifier],
93
141
  [$._macro_declaration_specifiers, $.type_definition, $.type_specifier],
94
142
  [$._macro_declaration_specifiers, $.type_specifier, $.expression],
95
143
  [$._macro_declaration_specifiers, $.type_specifier],
96
- [$._macro_declaration_specifiers, $._declaration_modifiers, $._empty_declaration],
97
144
  [$._macro_declaration_specifiers, $._declaration_modifiers],
98
145
  [$.preproc_include_argument],
99
146
  [$._preproc_include_token, $.preproc_argument_list],
@@ -112,16 +159,15 @@ module.exports = Object.assign(
112
159
  [$.va_arg_expression, $.expression],
113
160
  [$.type_definition, $._declaration_modifiers],
114
161
  [$._statement_type_definition, $._statement_declaration_modifiers],
115
- [$.type_definition, $._declaration_modifiers, $._empty_declaration],
116
162
  [$._statement_type_definition, $.type_specifier],
117
163
  [$.type_definition, $.type_qualifier, $.extension_expression],
118
164
  [$._statement_type_definition, $.type_qualifier, $.extension_expression],
119
165
  [$.type_definition, $.type_qualifier],
166
+ [$.type_definition, $._declaration_modifiers, $._empty_declaration],
120
167
  [$._statement_type_definition, $.type_qualifier],
121
168
  [$._statement_declaration_modifiers, $._statement_empty_declaration],
122
169
  [$.declaration, $.storage_class_specifier],
123
170
  [$._statement_declaration, $.storage_class_specifier],
124
- [$.sized_type_specifier, $.enum_specifier],
125
171
  [$.type_specifier, $._declarator],
126
172
  [$.type_specifier, $._declarator, $.macro_type_specifier],
127
173
  [$.type_specifier, $.expression],
@@ -132,7 +178,6 @@ module.exports = Object.assign(
132
178
  [$.sized_type_specifier],
133
179
  [$._sized_bit_int_specifier],
134
180
  [$.sized_type_specifier, $._sized_bit_int_specifier],
135
- [$._type_declarator, $.sized_type_specifier, $._sized_bit_int_specifier],
136
181
  [$.type_qualifier, $.atomic_type_specifier],
137
182
  [$.type_definition, $._type_declarator],
138
183
  [$.type_definition, $.sized_type_specifier],
@@ -171,7 +216,6 @@ module.exports = Object.assign(
171
216
  [$.attributed_type_declarator, $._type_declarator],
172
217
  [$._declaration_modifiers, $._field_declaration_list_item],
173
218
  [$._declaration_specifiers],
174
- [$._compound_literal_storage_class_specifier, $.type_specifier],
175
219
  [$._compound_literal_constexpr_specifier, $.type_qualifier],
176
220
  ],
177
221
 
@@ -225,6 +269,7 @@ module.exports = Object.assign(
225
269
  $._case_label_statement,
226
270
  $._case_label_chain_statement,
227
271
  $.type_specifier,
272
+ $._type_name_specifier,
228
273
  $._declarator,
229
274
  $._old_style_declarator,
230
275
  $._initialized_declarator,
@@ -605,6 +650,13 @@ module.exports = Object.assign(
605
650
  repeat($._non_macro_declaration_modifiers)
606
651
  ),
607
652
 
653
+ _field_declaration_specifiers: ($) =>
654
+ seq(
655
+ repeat($._declaration_modifiers),
656
+ field('type', alias($._type_name_specifier, $.type_specifier)),
657
+ repeat($._non_macro_declaration_modifiers)
658
+ ),
659
+
608
660
  _statement_declaration_specifiers: ($) =>
609
661
  seq(
610
662
  repeat($._statement_declaration_modifiers),
@@ -707,6 +759,7 @@ module.exports = Object.assign(
707
759
  alias($.array_type_declarator, $.array_declarator),
708
760
  alias($.parenthesized_type_declarator, $.parenthesized_declarator),
709
761
  $._type_identifier,
762
+ alias('thread_local', sym('type_identifier')),
710
763
  alias(choice('signed', 'unsigned', 'long', 'short'), $.primitive_type),
711
764
  $.primitive_type
712
765
  ),
@@ -932,26 +985,16 @@ module.exports = Object.assign(
932
985
 
933
986
  alignas_qualifier: ($) => seq(choice('alignas', '_Alignas'), '(', choice($.expression, $.type_descriptor), ')'),
934
987
 
935
- type_specifier: ($) =>
936
- choice(
937
- $._non_identifier_type_specifier,
938
- $.macro_type_specifier,
939
- $._type_identifier,
940
- prec.dynamic(-1, alias('thread_local', sym('type_identifier')))
941
- ),
988
+ type_specifier: ($) => typeSpecifier($, $.sized_type_specifier, $._sized_bit_int_specifier),
989
+
990
+ _type_name_specifier: ($) => typeSpecifier($, $._sized_type_name, $._sized_bit_int_type_name),
942
991
 
943
992
  _non_identifier_type_specifier: ($) =>
944
- choice(
945
- $.struct_specifier,
946
- $.union_specifier,
947
- $.enum_specifier,
948
- $.typeof_specifier,
949
- $.bit_int_specifier,
950
- $.atomic_type_specifier,
951
- $.sized_type_specifier,
952
- alias($._sized_bit_int_specifier, $.sized_type_specifier),
953
- $.primitive_type
954
- ),
993
+ nonIdentifierTypeSpecifier($, $.sized_type_specifier, $._sized_bit_int_specifier),
994
+
995
+ _sized_type_name: ($) => sizedTypeSpecifier($.primitive_type, true, $._sized_type_identifier, false),
996
+
997
+ _sized_bit_int_type_name: ($) => sizedTypeSpecifier($.bit_int_specifier, false, undefined, false),
955
998
 
956
999
  typeof_specifier: ($) =>
957
1000
  seq(
@@ -964,8 +1007,9 @@ module.exports = Object.assign(
964
1007
 
965
1008
  bit_int_specifier: ($) => seq('_BitInt', '(', $.expression, ')'),
966
1009
 
967
- sized_type_specifier: ($) =>
968
- sizedTypeSpecifier(optional(choice(prec.dynamic(-3, $._type_identifier), $.primitive_type))),
1010
+ sized_type_specifier: ($) => sizedTypeSpecifier($.primitive_type, true, $._sized_type_identifier),
1011
+
1012
+ _sized_type_identifier: ($) => prec.dynamic(-3, $._type_identifier),
969
1013
 
970
1014
  _sized_bit_int_specifier: ($) => sizedTypeSpecifier($.bit_int_specifier),
971
1015
 
@@ -994,33 +1038,32 @@ module.exports = Object.assign(
994
1038
  choice(
995
1039
  seq(
996
1040
  field('name', $._type_identifier),
997
- optional(
998
- seq(
999
- ':',
1000
- field(
1001
- 'underlying_type',
1002
- choice($.primitive_type, $.sized_type_specifier, $.typeof_specifier, $._type_identifier)
1003
- )
1004
- )
1005
- ),
1041
+ optional($._enum_underlying_type),
1006
1042
  field('body', optional($.enumerator_list))
1007
1043
  ),
1008
- seq(
1009
- optional(
1010
- seq(
1011
- ':',
1012
- field(
1013
- 'underlying_type',
1014
- choice($.primitive_type, $.sized_type_specifier, $.typeof_specifier, $._type_identifier)
1015
- )
1016
- )
1017
- ),
1018
- field('body', $.enumerator_list)
1019
- )
1044
+ seq(optional($._enum_underlying_type), field('body', $.enumerator_list))
1020
1045
  ),
1021
1046
  optional($.attribute_specifier)
1022
1047
  ),
1023
1048
 
1049
+ _enum_underlying_type: ($) =>
1050
+ prec.right(
1051
+ seq(
1052
+ ':',
1053
+ repeat($.type_qualifier),
1054
+ field(
1055
+ 'underlying_type',
1056
+ choice(
1057
+ $.primitive_type,
1058
+ alias($._sized_type_name, $.sized_type_specifier),
1059
+ $.typeof_specifier,
1060
+ $._type_identifier
1061
+ )
1062
+ ),
1063
+ repeat($.type_qualifier)
1064
+ )
1065
+ ),
1066
+
1024
1067
  enumerator_list: ($) =>
1025
1068
  seq(
1026
1069
  '{',
@@ -1086,9 +1129,16 @@ module.exports = Object.assign(
1086
1129
  ),
1087
1130
 
1088
1131
  field_declaration: ($) =>
1089
- seq($._declaration_specifiers, optional($._field_declaration_declarator), optional($.attribute_specifier), ';'),
1132
+ seq(
1133
+ $._field_declaration_specifiers,
1134
+ optional($._field_declaration_declarator),
1135
+ optional($.attribute_specifier),
1136
+ ';'
1137
+ ),
1090
1138
  _field_declaration_declarator: ($) =>
1091
- commaSep1(seq(field('declarator', $._field_declarator), optional($.bitfield_clause))),
1139
+ commaSep1(
1140
+ choice(seq(field('declarator', $._field_declarator), optional($.bitfield_clause)), $.bitfield_clause)
1141
+ ),
1092
1142
 
1093
1143
  bitfield_clause: ($) => seq(':', $.expression),
1094
1144
 
@@ -1315,6 +1365,7 @@ module.exports = Object.assign(
1315
1365
  seq(
1316
1366
  choice(
1317
1367
  field('initializer', alias($._statement_declaration, $.declaration)),
1368
+ field('initializer', alias($._for_empty_declaration, $.declaration)),
1318
1369
  seq(field('initializer', optional(choice($.expression, $.comma_expression))), ';')
1319
1370
  ),
1320
1371
  field('condition', optional(choice($.expression, $.comma_expression))),
@@ -1322,6 +1373,8 @@ module.exports = Object.assign(
1322
1373
  field('update', optional(choice($.expression, $.comma_expression)))
1323
1374
  ),
1324
1375
 
1376
+ _for_empty_declaration: ($) => prec.dynamic(-1, seq($._statement_declaration_specifiers, ';')),
1377
+
1325
1378
  return_statement: ($) => seq('return', optional(choice($.expression, $.comma_expression)), ';'),
1326
1379
 
1327
1380
  break_statement: () => seq('break', ';'),
@@ -1448,7 +1501,7 @@ module.exports = Object.assign(
1448
1501
  type_descriptor: ($) =>
1449
1502
  seq(
1450
1503
  repeat($.type_qualifier),
1451
- field('type', $.type_specifier),
1504
+ field('type', alias($._type_name_specifier, $.type_specifier)),
1452
1505
  repeat($.type_qualifier),
1453
1506
  field('declarator', optional($._abstract_declarator))
1454
1507
  ),
@@ -1771,12 +1824,29 @@ module.exports = Object.assign(
1771
1824
  _statement_identifier: ($) => alias(choice($.identifier, VA_ARG_KEYWORDS), sym('statement_identifier')),
1772
1825
 
1773
1826
  _empty_declaration: ($) =>
1827
+ choice(
1828
+ seq(
1829
+ repeat(choice($.ms_declspec_modifier, $.macro_specifier, $._leading_conditional_macro_specifier)),
1830
+ $.type_specifier,
1831
+ repeat($.type_qualifier),
1832
+ ';'
1833
+ ),
1834
+ $._statement_empty_declaration
1835
+ ),
1836
+
1837
+ _statement_empty_declaration: ($) =>
1774
1838
  seq(
1775
- repeat(choice($.ms_declspec_modifier, $.macro_specifier, $._leading_conditional_macro_specifier)),
1839
+ repeat(
1840
+ choice(
1841
+ $.ms_declspec_modifier,
1842
+ prec.dynamic(-1, $.storage_class_specifier),
1843
+ prec.dynamic(-1, $.type_qualifier)
1844
+ )
1845
+ ),
1776
1846
  $.type_specifier,
1847
+ repeat(choice($.type_qualifier, prec.dynamic(-1, $.storage_class_specifier))),
1777
1848
  ';'
1778
1849
  ),
1779
- _statement_empty_declaration: ($) => seq(repeat($.ms_declspec_modifier), $.type_specifier, ';'),
1780
1850
 
1781
1851
  macro_specifier: ($) => prec.dynamic(-2, field('name', $.identifier)),
1782
1852
 
@@ -1983,13 +2053,56 @@ function macroAttributeArgument($) {
1983
2053
  }
1984
2054
 
1985
2055
  /**
1986
- * @param {import('./types/treeSitterDsl').RuleOrLiteral} type
2056
+ * @param {import('./types/treeSitterDsl').GrammarSymbols<'struct_specifier' | 'union_specifier' | 'enum_specifier' | 'typeof_specifier' | 'bit_int_specifier' | 'atomic_type_specifier' | 'primitive_type' | 'macro_type_specifier' | '_type_identifier'>} $
2057
+ * @param {import('./types/treeSitterDsl').RuleOrLiteral} sized
2058
+ * @param {import('./types/treeSitterDsl').RuleOrLiteral} bitInt
2059
+ */
2060
+ function typeSpecifier($, sized, bitInt) {
2061
+ return choice(
2062
+ nonIdentifierTypeSpecifier($, sized, bitInt),
2063
+ $.macro_type_specifier,
2064
+ $._type_identifier,
2065
+ prec.dynamic(-1, alias('thread_local', sym('type_identifier')))
2066
+ );
2067
+ }
2068
+
2069
+ /**
2070
+ * @param {import('./types/treeSitterDsl').GrammarSymbols<'struct_specifier' | 'union_specifier' | 'enum_specifier' | 'typeof_specifier' | 'bit_int_specifier' | 'atomic_type_specifier' | 'primitive_type'>} $
2071
+ * @param {import('./types/treeSitterDsl').RuleOrLiteral} sized
2072
+ * @param {import('./types/treeSitterDsl').RuleOrLiteral} bitInt
2073
+ */
2074
+ function nonIdentifierTypeSpecifier($, sized, bitInt) {
2075
+ return choice(
2076
+ $.struct_specifier,
2077
+ $.union_specifier,
2078
+ $.enum_specifier,
2079
+ $.typeof_specifier,
2080
+ $.bit_int_specifier,
2081
+ $.atomic_type_specifier,
2082
+ alias(sized, sym('sized_type_specifier')),
2083
+ alias(bitInt, sym('sized_type_specifier')),
2084
+ $.primitive_type
2085
+ );
2086
+ }
2087
+
2088
+ /**
2089
+ * @param {import('./types/treeSitterDsl').RuleOrLiteral} knownType
2090
+ * @param {boolean} allowImplicitType
2091
+ * @param {import('./types/treeSitterDsl').RuleOrLiteral} [opaqueType]
2092
+ * @param {boolean} allowStorage
1987
2093
  */
1988
- function sizedTypeSpecifier(type) {
2094
+ function sizedTypeSpecifier(knownType, allowImplicitType = false, opaqueType, allowStorage = true) {
2095
+ const type = opaqueType === undefined ? knownType : choice(opaqueType, knownType);
1989
2096
  const modifier = choice('signed', 'unsigned', 'long', 'short', '_Complex', '_Imaginary', '__complex__');
2097
+ const interleaved = repeat(
2098
+ allowStorage ? choice(sym('type_qualifier'), sym('storage_class_specifier')) : sym('type_qualifier')
2099
+ );
2100
+ const modifiers = repeat(seq(interleaved, modifier));
2101
+ const typedTail = seq(interleaved, field('type', type), modifiers);
1990
2102
  return choice(
1991
- seq(repeat(modifier), field('type', type), repeat1(modifier)),
1992
- seq(repeat1(modifier), repeat(sym('type_qualifier')), field('type', type), repeat(modifier))
2103
+ seq(field('type', knownType), repeat1(seq(interleaved, modifier))),
2104
+ ...(opaqueType === undefined ? [] : [seq(field('type', opaqueType), modifier, modifiers)]),
2105
+ seq(modifier, modifiers, allowImplicitType ? optional(typedTail) : typedTail)
1993
2106
  );
1994
2107
  }
1995
2108
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-c",
3
- "version": "18.0.0",
3
+ "version": "18.0.1",
4
4
  "description": "C grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "c",
@@ -1278,10 +1278,18 @@
1278
1278
  "type": "statement",
1279
1279
  "named": true
1280
1280
  },
1281
+ {
1282
+ "type": "storage_class_specifier",
1283
+ "named": true
1284
+ },
1281
1285
  {
1282
1286
  "type": "type_definition",
1283
1287
  "named": true
1284
1288
  },
1289
+ {
1290
+ "type": "type_qualifier",
1291
+ "named": true
1292
+ },
1285
1293
  {
1286
1294
  "type": "type_specifier",
1287
1295
  "named": true
@@ -1385,7 +1393,7 @@
1385
1393
  "fields": {
1386
1394
  "declarator": {
1387
1395
  "multiple": true,
1388
- "required": true,
1396
+ "required": false,
1389
1397
  "types": [
1390
1398
  {
1391
1399
  "type": "array_declarator",
@@ -1571,6 +1579,10 @@
1571
1579
  "type": "return_statement",
1572
1580
  "named": true
1573
1581
  },
1582
+ {
1583
+ "type": "storage_class_specifier",
1584
+ "named": true
1585
+ },
1574
1586
  {
1575
1587
  "type": "switch_statement",
1576
1588
  "named": true
@@ -1579,6 +1591,10 @@
1579
1591
  "type": "type_definition",
1580
1592
  "named": true
1581
1593
  },
1594
+ {
1595
+ "type": "type_qualifier",
1596
+ "named": true
1597
+ },
1582
1598
  {
1583
1599
  "type": "type_specifier",
1584
1600
  "named": true
@@ -1689,6 +1705,10 @@
1689
1705
  {
1690
1706
  "type": "attribute_specifier",
1691
1707
  "named": true
1708
+ },
1709
+ {
1710
+ "type": "type_qualifier",
1711
+ "named": true
1692
1712
  }
1693
1713
  ]
1694
1714
  }
@@ -3255,10 +3275,18 @@
3255
3275
  "type": "statement",
3256
3276
  "named": true
3257
3277
  },
3278
+ {
3279
+ "type": "storage_class_specifier",
3280
+ "named": true
3281
+ },
3258
3282
  {
3259
3283
  "type": "type_definition",
3260
3284
  "named": true
3261
3285
  },
3286
+ {
3287
+ "type": "type_qualifier",
3288
+ "named": true
3289
+ },
3262
3290
  {
3263
3291
  "type": "type_specifier",
3264
3292
  "named": true
@@ -3371,10 +3399,18 @@
3371
3399
  "type": "statement",
3372
3400
  "named": true
3373
3401
  },
3402
+ {
3403
+ "type": "storage_class_specifier",
3404
+ "named": true
3405
+ },
3374
3406
  {
3375
3407
  "type": "type_definition",
3376
3408
  "named": true
3377
3409
  },
3410
+ {
3411
+ "type": "type_qualifier",
3412
+ "named": true
3413
+ },
3378
3414
  {
3379
3415
  "type": "type_specifier",
3380
3416
  "named": true
@@ -3458,10 +3494,18 @@
3458
3494
  "type": "statement",
3459
3495
  "named": true
3460
3496
  },
3497
+ {
3498
+ "type": "storage_class_specifier",
3499
+ "named": true
3500
+ },
3461
3501
  {
3462
3502
  "type": "type_definition",
3463
3503
  "named": true
3464
3504
  },
3505
+ {
3506
+ "type": "type_qualifier",
3507
+ "named": true
3508
+ },
3465
3509
  {
3466
3510
  "type": "type_specifier",
3467
3511
  "named": true
@@ -3652,10 +3696,18 @@
3652
3696
  "type": "statement",
3653
3697
  "named": true
3654
3698
  },
3699
+ {
3700
+ "type": "storage_class_specifier",
3701
+ "named": true
3702
+ },
3655
3703
  {
3656
3704
  "type": "type_definition",
3657
3705
  "named": true
3658
3706
  },
3707
+ {
3708
+ "type": "type_qualifier",
3709
+ "named": true
3710
+ },
3659
3711
  {
3660
3712
  "type": "type_specifier",
3661
3713
  "named": true
@@ -3768,10 +3820,18 @@
3768
3820
  "type": "statement",
3769
3821
  "named": true
3770
3822
  },
3823
+ {
3824
+ "type": "storage_class_specifier",
3825
+ "named": true
3826
+ },
3771
3827
  {
3772
3828
  "type": "type_definition",
3773
3829
  "named": true
3774
3830
  },
3831
+ {
3832
+ "type": "type_qualifier",
3833
+ "named": true
3834
+ },
3775
3835
  {
3776
3836
  "type": "type_specifier",
3777
3837
  "named": true
@@ -4002,6 +4062,10 @@
4002
4062
  "multiple": true,
4003
4063
  "required": false,
4004
4064
  "types": [
4065
+ {
4066
+ "type": "storage_class_specifier",
4067
+ "named": true
4068
+ },
4005
4069
  {
4006
4070
  "type": "type_qualifier",
4007
4071
  "named": true
@@ -4301,6 +4365,10 @@
4301
4365
  "type": "return_statement",
4302
4366
  "named": true
4303
4367
  },
4368
+ {
4369
+ "type": "storage_class_specifier",
4370
+ "named": true
4371
+ },
4304
4372
  {
4305
4373
  "type": "switch_statement",
4306
4374
  "named": true
@@ -4309,6 +4377,10 @@
4309
4377
  "type": "type_definition",
4310
4378
  "named": true
4311
4379
  },
4380
+ {
4381
+ "type": "type_qualifier",
4382
+ "named": true
4383
+ },
4312
4384
  {
4313
4385
  "type": "type_specifier",
4314
4386
  "named": true
Binary file
package/tree-sitter.json CHANGED
@@ -16,7 +16,7 @@
16
16
  }
17
17
  ],
18
18
  "metadata": {
19
- "version": "18.0.0",
19
+ "version": "18.0.1",
20
20
  "license": "MIT",
21
21
  "description": "C grammar for tree-sitter",
22
22
  "authors": [