Skip to content

Commit

Permalink
Make sure we don't get an error if no whitespace was found during act…
Browse files Browse the repository at this point in the history
…ion parsing.
  • Loading branch information
mike-lischke committed Dec 30, 2024
1 parent 5799e87 commit c6faa3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/grammars/ActionSplitter.g4
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public getActionTokens(delegate: ActionSplitterListener, refToken?: Token): Toke
throw new Error(`Mismatched input '${text}'`);
}

const { x, s1, s2, expr } = match.groups!;
const { x, s1 = "", s2 = "", expr } = match.groups!;

// +2 for the second '$' and the '='.
const [xToken, yToken] = this.createTokens(t, x.length + s1.length + s2.length + 2, refToken);
Expand Down

0 comments on commit c6faa3b

Please sign in to comment.