Skip to content

Commit

Permalink
feat: support static in array declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed May 31, 2024
1 parent 00ed08f commit b857077
Show file tree
Hide file tree
Showing 5 changed files with 24,555 additions and 24,471 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
* text eol=lf
test/corpus/crlf.txt text eol=crlf
* text=auto eol=lf

examples/* linguist-vendored

Expand Down
8 changes: 4 additions & 4 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,28 +504,28 @@ module.exports = grammar({
array_declarator: $ => prec(1, seq(
field('declarator', $._declarator),
'[',
repeat($.type_qualifier),
repeat(choice($.type_qualifier, 'static')),
field('size', optional(choice($._expression, '*'))),
']',
)),
array_field_declarator: $ => prec(1, seq(
field('declarator', $._field_declarator),
'[',
repeat($.type_qualifier),
repeat(choice($.type_qualifier, 'static')),
field('size', optional(choice($._expression, '*'))),
']',
)),
array_type_declarator: $ => prec(1, seq(
field('declarator', $._type_declarator),
'[',
repeat($.type_qualifier),
repeat(choice($.type_qualifier, 'static')),
field('size', optional(choice($._expression, '*'))),
']',
)),
abstract_array_declarator: $ => prec(1, seq(
field('declarator', optional($._abstract_declarator)),
'[',
repeat($.type_qualifier),
repeat(choice($.type_qualifier, 'static')),
field('size', optional(choice($._expression, '*'))),
']',
)),
Expand Down
52 changes: 44 additions & 8 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b857077

Please sign in to comment.