@willbooster/tree-sitter-c 6.0.0 → 6.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
@@ -1336,8 +1336,14 @@ module.exports = Object.assign(
1336
1336
 
1337
1337
  extension_expression: ($) => seq('__extension__', $.expression),
1338
1338
 
1339
- // The compound_statement is added to parse macros taking statements as arguments, e.g. MYFORLOOP(1, 10, i, { foo(i); bar(i); })
1340
- argument_list: ($) => seq('(', commaSep(choice($.expression, $.compound_statement)), ')'),
1339
+ // Compound statements, designated initializers, and a trailing comma parse macro arguments, e.g.
1340
+ // MYFORLOOP(1, 10, i, { foo(i); bar(i); }) and PARAMS(.foo = foo, .bar = { bar, 1 },)
1341
+ argument_list: ($) =>
1342
+ seq(
1343
+ '(',
1344
+ optional(seq(commaSep1(choice($.expression, $.compound_statement, $.initializer_pair)), optional(','))),
1345
+ ')'
1346
+ ),
1341
1347
 
1342
1348
  field_expression: ($) =>
1343
1349
  seq(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-c",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "description": "C grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -527,6 +527,10 @@
527
527
  "type": "expression",
528
528
  "named": true
529
529
  },
530
+ {
531
+ "type": "initializer_pair",
532
+ "named": true
533
+ },
530
534
  {
531
535
  "type": "preproc_defined",
532
536
  "named": true
Binary file
package/tree-sitter.json CHANGED
@@ -16,7 +16,7 @@
16
16
  }
17
17
  ],
18
18
  "metadata": {
19
- "version": "6.0.0",
19
+ "version": "6.0.1",
20
20
  "license": "MIT",
21
21
  "description": "C grammar for tree-sitter",
22
22
  "authors": [