Skip to content

Commit

Permalink
Support the "inline" type parameter requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickpeterse committed Nov 28, 2024
1 parent aecabed commit a6fb0b0
Show file tree
Hide file tree
Showing 5 changed files with 15,701 additions and 15,604 deletions.
4 changes: 3 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ module.exports = grammar({
module_method: $ => seq(
'fn',
field('visibility', optional($.visibility)),
field('modifier', optional(alias('inline', $.modifier))),
field('modifier', optional(alias($.inline, $.modifier))),
field('name', alias($.method_name, $.identifier)),
field('type_parameters', optional($.type_parameters)),
field('arguments', optional(alias($.method_arguments, $.arguments))),
Expand Down Expand Up @@ -133,6 +133,7 @@ module.exports = grammar({
),
_type_parameter_requirement: $ => choice(
$.mutable,
$.inline,
$.generic_type,
alias($.constant, $.type),
),
Expand Down Expand Up @@ -641,6 +642,7 @@ module.exports = grammar({
break: _ => 'break',
next: _ => 'next',
mutable: _ => 'mut',
inline: _ => 'inline',
move: _ => 'move',
visibility: _ => 'pub',
line_comment: _ => token(prec(-1, seq('#', /.*/))),
Expand Down
12 changes: 10 additions & 2 deletions src/grammar.json

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

9 changes: 9 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 a6fb0b0

Please sign in to comment.