From 54370109b28f1c45c313ac4be203c058b80808ba Mon Sep 17 00:00:00 2001 From: Rob Greene Date: Sun, 10 Jun 2018 10:35:50 -0500 Subject: [PATCH] Fixing the "IF expr THEN [GOTO|GOSUB] n" case. --- .../bastokenizer/api/visitors/ReassignmentVisitor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/io/github/applecommander/bastokenizer/api/visitors/ReassignmentVisitor.java b/api/src/main/java/io/github/applecommander/bastokenizer/api/visitors/ReassignmentVisitor.java index ec02a62..66629ea 100644 --- a/api/src/main/java/io/github/applecommander/bastokenizer/api/visitors/ReassignmentVisitor.java +++ b/api/src/main/java/io/github/applecommander/bastokenizer/api/visitors/ReassignmentVisitor.java @@ -44,6 +44,7 @@ public class ReassignmentVisitor implements Visitor { * - GOSUB n * - GOTO n * - IF ... THEN n + * - IF ... THEN [GOTO|GOSUB] n * - LIST n [ ,m ] * - ON x GOTO n, m, ... * - ON x GOSUB n, m, ... @@ -66,7 +67,8 @@ public class ReassignmentVisitor implements Visitor { next = t.keyword == ApplesoftKeyword.GOSUB || t.keyword == ApplesoftKeyword.GOTO || t.keyword == ApplesoftKeyword.THEN || t.keyword == ApplesoftKeyword.RUN || t.keyword == ApplesoftKeyword.LIST; - multiple |= t.keyword == ApplesoftKeyword.LIST || t.keyword == ApplesoftKeyword.ON; + multiple |= t.keyword == ApplesoftKeyword.LIST || t.keyword == ApplesoftKeyword.ON + || t.keyword == ApplesoftKeyword.THEN; } newStatement.tokens.add(newToken); }