Remove the RESTORE line-number syntax, which turns out not to be in applesoft
authorNick Downing <nick@ndcode.org>
Thu, 19 May 2022 15:06:15 +0000 (01:06 +1000)
committerNick Downing <nick@ndcode.org>
Thu, 19 May 2022 15:06:15 +0000 (01:06 +1000)
applesoft_basic.t
applesoft_basic.y

index fb6b590..546a564 100644 (file)
@@ -574,11 +574,7 @@ def execute(self, context):
     context.j = 1
 @method(StatementRestore)
 def execute(self, context):
-  context.k = (
-    context.find_line(self.children[0].int_value)
-  if len(self.children) >= 1 else
-    0
-  )
+  context.k = 0
   context.l = 1
   context.m = 0
 @method(StatementAmpersand)
index 0d1ca43..94e87bd 100644 (file)
@@ -218,7 +218,6 @@ statement_opt
   | %space (?E{t_def.StatementIf}TOKEN_IF rvalue TOKEN_THEN) statement_opt
   | %space (?E{t_def.StatementIf}TOKEN_IF rvalue TOKEN_THEN) %space (?E{t_def.StatementGoto}INT_LITERAL)
   | %space (?E{t_def.StatementRestore}TOKEN_RESTORE)
-  | %space (?E{t_def.StatementRestore}TOKEN_RESTORE INT_LITERAL)
   | %space (?E{t_def.StatementAmpersand}TOKEN_AMPERSAND)
   | %space (?E{t_def.StatementGosub}TOKEN_GOSUB INT_LITERAL)
   | %space (?E{t_def.StatementReturn}TOKEN_RETURN)