mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-10 06:54:04 +09:00
basic: NEXT of FOR loop now works but now unary op is not parsed correctly
This commit is contained in:
@@ -11,7 +11,7 @@ stmt =
|
||||
| "DEFUN" , [ident] , "(" , [ident , {" , " , ident}] , ")" , "=" , expr
|
||||
| "ON" , expr_sans_asgn , ("GOTO" | "GOSUB") , expr_sans_asgn , {"," , expr_sans_asgn}
|
||||
| "(" , stmt , ")"
|
||||
| expr ;
|
||||
| expr ; (* if the statement contains only one word, treat it as function_call e.g. NEXT for FOR loop *)
|
||||
|
||||
expr = (* this basically blocks some funny attemps such as using DEFUN as anon function because everything is global in BASIC *)
|
||||
lit
|
||||
|
||||
Reference in New Issue
Block a user