Skip to content

Commit a6fb0b0

Browse files
committed
Support the "inline" type parameter requirement
1 parent aecabed commit a6fb0b0

File tree

5 files changed

+15701
-15604
lines changed

5 files changed

+15701
-15604
lines changed

grammar.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ module.exports = grammar({
103103
module_method: $ => seq(
104104
'fn',
105105
field('visibility', optional($.visibility)),
106-
field('modifier', optional(alias('inline', $.modifier))),
106+
field('modifier', optional(alias($.inline, $.modifier))),
107107
field('name', alias($.method_name, $.identifier)),
108108
field('type_parameters', optional($.type_parameters)),
109109
field('arguments', optional(alias($.method_arguments, $.arguments))),
@@ -133,6 +133,7 @@ module.exports = grammar({
133133
),
134134
_type_parameter_requirement: $ => choice(
135135
$.mutable,
136+
$.inline,
136137
$.generic_type,
137138
alias($.constant, $.type),
138139
),
@@ -641,6 +642,7 @@ module.exports = grammar({
641642
break: _ => 'break',
642643
next: _ => 'next',
643644
mutable: _ => 'mut',
645+
inline: _ => 'inline',
644646
move: _ => 'move',
645647
visibility: _ => 'pub',
646648
line_comment: _ => token(prec(-1, seq('#', /.*/))),

src/grammar.json

+10-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node-types.json

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)