@willbooster/tree-sitter-c 5.0.0 → 5.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
@@ -726,6 +726,7 @@ module.exports = Object.assign(
726
726
  enum_specifier: ($) =>
727
727
  seq(
728
728
  'enum',
729
+ repeat(choice($.attribute_specifier, $.attribute_declaration)),
729
730
  choice(
730
731
  seq(
731
732
  field('name', $._type_identifier),
@@ -784,8 +785,7 @@ module.exports = Object.assign(
784
785
  prec.right(
785
786
  seq(
786
787
  'struct',
787
- optional($.attribute_specifier),
788
- optional($.ms_declspec_modifier),
788
+ repeat(choice($.attribute_specifier, $.attribute_declaration, $.ms_declspec_modifier)),
789
789
  choice(
790
790
  seq(field('name', $._type_identifier), field('body', optional($.field_declaration_list))),
791
791
  field('body', $.field_declaration_list)
@@ -798,7 +798,7 @@ module.exports = Object.assign(
798
798
  prec.right(
799
799
  seq(
800
800
  'union',
801
- optional($.ms_declspec_modifier),
801
+ repeat(choice($.attribute_specifier, $.attribute_declaration, $.ms_declspec_modifier)),
802
802
  choice(
803
803
  seq(field('name', $._type_identifier), field('body', optional($.field_declaration_list))),
804
804
  field('body', $.field_declaration_list)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-c",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "C grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -1520,9 +1520,13 @@
1520
1520
  }
1521
1521
  },
1522
1522
  "children": {
1523
- "multiple": false,
1523
+ "multiple": true,
1524
1524
  "required": false,
1525
1525
  "types": [
1526
+ {
1527
+ "type": "attribute_declaration",
1528
+ "named": true
1529
+ },
1526
1530
  {
1527
1531
  "type": "attribute_specifier",
1528
1532
  "named": true
@@ -3746,6 +3750,10 @@
3746
3750
  "multiple": true,
3747
3751
  "required": false,
3748
3752
  "types": [
3753
+ {
3754
+ "type": "attribute_declaration",
3755
+ "named": true
3756
+ },
3749
3757
  {
3750
3758
  "type": "attribute_specifier",
3751
3759
  "named": true
@@ -4195,6 +4203,10 @@
4195
4203
  "multiple": true,
4196
4204
  "required": false,
4197
4205
  "types": [
4206
+ {
4207
+ "type": "attribute_declaration",
4208
+ "named": true
4209
+ },
4198
4210
  {
4199
4211
  "type": "attribute_specifier",
4200
4212
  "named": true
Binary file
package/tree-sitter.json CHANGED
@@ -16,7 +16,7 @@
16
16
  }
17
17
  ],
18
18
  "metadata": {
19
- "version": "5.0.0",
19
+ "version": "5.0.1",
20
20
  "license": "MIT",
21
21
  "description": "C grammar for tree-sitter",
22
22
  "authors": [