Added conditionals to grammar
This commit is contained in:
parent
0e3aaa8b08
commit
5aa4c404a5
@ -11,10 +11,11 @@ use tokenizer::{Token, Kw, Op};
|
||||
exprlist := Expression (Comma Expression)* | e
|
||||
|
||||
expression := primary_expression (op primary_expression)*
|
||||
primary_expression := Number | String | identifier_expr | paren_expr
|
||||
primary_expression := Number | String | identifier_expr | paren_expr | conditional_expr
|
||||
identifier_expr := call_expression | Variable
|
||||
paren_expr := LParen expression RParen
|
||||
call_expr := Identifier LParen exprlist RParen
|
||||
conditional_expr := IF expression THEN (expression delimiter?)* ELSE (expresion delimiter?)* END
|
||||
op := '+', '-', etc.
|
||||
*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user