fix @rust functions

This commit is contained in:
Daniella / Tove 2023-08-04 22:22:10 +02:00
parent e88e10b68e
commit 99c1442712
Signed by: TudbuT
GPG key ID: 7D63D5634B7C417F

View file

@ -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),
'}', '}',
), ),