Skip to content

Commit

Permalink
adding new attribute keywords to handle scope name parsing
Browse files Browse the repository at this point in the history
adding new attribute keywords to handle scope name parsing (__read_mostly, __must_hold, __ro_after_init, __init and __aligned)
  • Loading branch information
edogrigqv2 authored Feb 21, 2024
1 parent 043ce4f commit 7fa01fe
Show file tree
Hide file tree
Showing 5 changed files with 98,383 additions and 93,257 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ node_modules
build
package-lock.json
/target/
.build/
.build/

.vscode
5 changes: 5 additions & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ module.exports = grammar({
choice(
seq('__attribute__','(',$.argument_list,')'),
seq(choice('__scanf', '__printf'), '(', commaSep($.number_literal), ')'),
'__read_mostly',
seq(choice('__must_hold'), '(', $.argument_list, ')'),
'__ro_after_init',
'__init'
),
),

Expand Down Expand Up @@ -653,6 +657,7 @@ module.exports = grammar({
field('body', $.field_declaration_list),
),
optional($.attribute_specifier),
optional(seq('__aligned', '(', $.argument_list, ')')),
)),

union_specifier: $ => prec.right(seq(
Expand Down
67 changes: 67 additions & 0 deletions src/grammar.json

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

24 changes: 24 additions & 0 deletions src/node-types.json

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

Loading

0 comments on commit 7fa01fe

Please sign in to comment.