Skip to content

Commit

Permalink
feat: support raw references
Browse files Browse the repository at this point in the history
  • Loading branch information
flippette authored Nov 11, 2024
1 parent 9b201c2 commit 5274df6
Show file tree
Hide file tree
Showing 6 changed files with 90,437 additions and 89,732 deletions.
5 changes: 4 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,10 @@ module.exports = grammar({

reference_expression: $ => prec(PREC.unary, seq(
'&',
optional($.mutable_specifier),
choice(
seq('raw', choice('const', $.mutable_specifier)),
optional($.mutable_specifier),
),
field('value', $._expression),
)),

Expand Down
1 change: 1 addition & 0 deletions queries/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"mod" @keyword
"move" @keyword
"pub" @keyword
"raw" @keyword
"ref" @keyword
"return" @keyword
"static" @keyword
Expand Down
33 changes: 30 additions & 3 deletions src/grammar.json

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

4 changes: 4 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 5274df6

Please sign in to comment.