fix @rust functions
This commit is contained in:
parent
e88e10b68e
commit
99c1442712
1 changed files with 2 additions and 2 deletions
|
@ -29,10 +29,10 @@ module.exports = grammar({
|
||||||
function_definition: $ => choice($.func, $.block),
|
function_definition: $ => choice($.func, $.block),
|
||||||
func: $ => seq(
|
func: $ => seq(
|
||||||
'func', $._spacing,
|
'func', $._spacing,
|
||||||
$.identifier, $._spacing, choice(seq('@', $.identifier, $.block), $.block),
|
$.identifier, $._spacing, choice(seq('@', $.identifier, '{', $._spacing, repeat(/./), $._spacing, '}'), $.block),
|
||||||
),
|
),
|
||||||
block: $ => seq(
|
block: $ => seq(
|
||||||
optional('!'), '{', optional($._spacing, repeat(seq(/[^ \n\r\t|]+/, $._spacing)), '|'),
|
'{', $._spacing, repeat(seq(/[^ \n\r\t|]+/, $._spacing), '|'),
|
||||||
repeat($._statement),
|
repeat($._statement),
|
||||||
'}',
|
'}',
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Reference in a new issue