From 99c1442712211ced51e696360c5f974a7de62ed5 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Fri, 4 Aug 2023 22:22:10 +0200 Subject: [PATCH] fix @rust functions --- grammar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grammar.js b/grammar.js index 13334e1..52271f5 100644 --- a/grammar.js +++ b/grammar.js @@ -29,10 +29,10 @@ module.exports = grammar({ function_definition: $ => choice($.func, $.block), func: $ => seq( 'func', $._spacing, - $.identifier, $._spacing, choice(seq('@', $.identifier, $.block), $.block), + $.identifier, $._spacing, choice(seq('@', $.identifier, '{', $._spacing, repeat(/./), $._spacing, '}'), $.block), ), block: $ => seq( - optional('!'), '{', optional($._spacing, repeat(seq(/[^ \n\r\t|]+/, $._spacing)), '|'), + '{', $._spacing, repeat(seq(/[^ \n\r\t|]+/, $._spacing), '|'), repeat($._statement), '}', ),