Skip to content

Commit

Permalink
Fix for mal-formed logic lines crashing compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
joethephish committed Nov 8, 2018
1 parent a1399d5 commit 347eaaa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/InkParser/InkParser_Logic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ protected Parsed.Object LogicLine()

var result = Expect(afterTilda, "expression after '~'", recoveryRule: SkipToNextLine) as Parsed.Object;

// Prevent further errors, already reported expected expression and have skipped to next line.
if (result == null) return new ContentList();

// Parse all expressions, but tell the writer off if they did something useless like:
// ~ 5 + 4
// And even:
Expand Down

0 comments on commit 347eaaa

Please sign in to comment.