mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-12 23:54:04 +09:00
basic: new parser works with correctly entered IF, DEFUN and function_calls
This commit is contained in:
@@ -4,7 +4,7 @@ linenumber = digits ;
|
||||
stmt =
|
||||
"IF" , if_equation , "THEN" , stmt , ["ELSE" , stmt]
|
||||
| "DEFUN" , [ident] , "(" , [ident , {" , " , ident}] , ")" , "=" , stmt
|
||||
| "ON" , ident , ident , equation , {"," , equation}
|
||||
| "ON" , if_equation , ident , if_equation , {"," , if_equation}
|
||||
| "(" , stmt , ")"
|
||||
| function_call ;
|
||||
|
||||
@@ -61,7 +61,6 @@ bindigit = "0" | "1" ;
|
||||
|
||||
(* all possible token states: lit num op bool qot paren sep *)
|
||||
|
||||
|
||||
IF (type: function, value: IF)
|
||||
1. cond
|
||||
2. true
|
||||
|
||||
Reference in New Issue
Block a user