From 6f742ec5777b86c18044ddf84e52ad2aa6c5133b Mon Sep 17 00:00:00 2001 From: Brandon Dyck Date: Sun, 2 Jul 2023 12:05:39 -0600 Subject: [PATCH] Allow trailing comma in function call grammar --- grammar.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grammar.txt b/grammar.txt index 50292be..6231b72 100644 --- a/grammar.txt +++ b/grammar.txt @@ -36,5 +36,5 @@ identifier -> IDENTIFIER | "@" STRING ; operand -> ( NUMBER | STRING | identifier | "(" expression ")" | record | variant | list) ; selector -> "." identifier ; index -> "[" expression "]" ; -arguments -> "(" ( "_" | expression ( "," ( "_" | expression ) )* )? ")" ; -primary -> operand ( selector | index | arguments ) ; +call -> "(" ( ( "_" | expression ) ( "," ( "_" | expression ) )* ","? )? ")" ; +primary -> operand ( selector | index | call ) ;