Skip to content

Commit

Permalink
Allow statements to end with EOF instead of forcing a newline for eve…
Browse files Browse the repository at this point in the history
…ry evaluated statement
  • Loading branch information
ethanmoffat committed Jan 29, 2022
1 parent 615b15e commit 5a81898
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EOBot/Interpreter/States/StatementEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public bool Evaluate(ProgramState input)
|| Evaluate<KeywordEvaluator>(input)
|| Evaluate<LabelEvaluator>(input)
|| Evaluate<FunctionEvaluator>(input))
&& input.Expect(BotTokenType.NewLine);
&& (input.Expect(BotTokenType.NewLine) || input.Expect(BotTokenType.EOF));
}

private bool Evaluate<T>(ProgramState input)
Expand Down

0 comments on commit 5a81898

Please sign in to comment.