Skip to content

Commit

Permalink
also better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
salazarm committed Feb 27, 2025
1 parent ed3da84 commit 4a5fbef
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class CustomErrorListener implements ANTLRErrorListener<any> {
): void {
let from = charPositionInLine;
if (offendingSymbol?.text === '<EOF>') {
// If the error is at the very end of the input, set the from to the start of the input
from = 0;
}
this.errors.push({
Expand Down

0 comments on commit 4a5fbef

Please sign in to comment.