Allow trailing comma in list and record grammars
This commit is contained in:
parent
63edbae650
commit
5f9b4a2fb6
@ -28,10 +28,10 @@ control ->
|
||||
if -> "if" expression "then" expression "else" expression ;
|
||||
when -> "when" expression "is" ( ( identifier | pattern ) "=>" expression )+ ;
|
||||
variant -> "`" identifier ( "(" expression ")" )? ;
|
||||
base_record -> expression ( "with" identifier "=" expression ( "," "with" identifier "=" expression )* )?
|
||||
base_record -> expression ( "with" identifier "=" expression ( "," identifier "=" expression )* ","? )?
|
||||
record ->
|
||||
"{" ( identifier ("=" expression)? ( "," identifier ("=" expression)? )* )? ( "|" base_record )* "}" ;
|
||||
list -> "[" ( expression ( "," expression )* )? "]" ;
|
||||
"{" ( identifier ("=" expression)? ( "," identifier ("=" expression)? )* )? ( "|" base_record )? "}" ;
|
||||
list -> "[" ( expression ( "," expression )* ","? )? "]" ;
|
||||
identifier -> IDENTIFIER | "@" STRING ;
|
||||
operand -> ( NUMBER | STRING | identifier | "(" expression ")" | record | variant | list) ;
|
||||
selector -> "." identifier ;
|
||||
|
Loading…
Reference in New Issue
Block a user