basic: still broken but we're getting there

This commit is contained in:
minjaesong
2020-12-13 00:12:20 +09:00
parent 24cd1a030f
commit 5a09c4915d
3 changed files with 201 additions and 198 deletions

View File

@@ -7,6 +7,7 @@ linenumber = digits ;
stmt =
"IF" , expr_sans_asgn , "THEN" , stmt , ["ELSE" , stmt]
| "FOR" , expr // TODO
| "DEFUN" , [ident] , "(" , [ident , {" , " , ident}] , ")" , "=" , expr
| "ON" , expr_sans_asgn , ("GOTO" | "GOSUB") , expr_sans_asgn , {"," , expr_sans_asgn}
| "(" , stmt , ")"
@@ -69,6 +70,9 @@ IF (type: function, value: IF)
2. true
[3. false]
FOR (type: function, value: FOR)
1. expr (normally (=) but not necessarily)
DEFUN (type: function, value: DEFUN)
1. funcname
1. arg0