[parser] foirbid calling auxiliary nodes with no arguments

This commit is contained in:
dsac 2022-12-15 22:07:16 +01:00
parent 97c6020414
commit 0d5e045671

View File

@ -386,6 +386,9 @@ expr:
/* Tuples */ /* Tuples */
| LPAREN expr_comma_list RPAREN { $2 } | LPAREN expr_comma_list RPAREN { $2 }
/* Applications */ /* Applications */
| IDENT LPAREN RPAREN
{ raise (MyParsingError ("An application should come with arguments!",
current_location())) }
| IDENT LPAREN expr_comma_list RPAREN | IDENT LPAREN expr_comma_list RPAREN
{ let name = $1 in { let name = $1 in
let node = fetch_node name in let node = fetch_node name in