From daf049ed8cad553bd3997f9deae8bef0ebe883a2 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Fri, 4 Aug 2023 22:12:45 +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 2da13c3..62cc95a 100644 --- a/grammar.js +++ b/grammar.js @@ -29,11 +29,11 @@ module.exports = grammar({ function_definition: $ => choice($.func, $.block), func: $ => seq( 'func', $._spacing, - $.identifier, $._spacing, + $.identifier, optional($._spacing, $.identifier), $._spacing, $.block, ), block: $ => seq( - '{', $._spacing, repeat(seq(/[^ \n\r\t|]+/, $._spacing)), '|', + '{', optional($._spacing, repeat(seq(/[^ \n\r\t|]+/, $._spacing)), '|'), repeat($._statement), '}', ),