Skip to content

Commit

Permalink
Merge pull request #204 from tomhea/fix-None-token-in-parser
Browse files Browse the repository at this point in the history
add "} or {" note for parsing error message
  • Loading branch information
tomhea authored Dec 28, 2022
2 parents 5c4a99f + f94ab1a commit 53e4bde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fj_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def error(self, token: Token) -> None:
error_occurred = True
print()
if token is None:
print(f'Syntax Error in {get_position(self.line_position(None))}, unknown token')
print(f'Syntax Error in {get_position(self.line_position(None))}. Maybe missing }} or {{ before this line?')
else:
print(f'Syntax Error in {get_position(token.lineno)}, token=("{token.type}", {token.value})')

Expand Down

0 comments on commit 53e4bde

Please sign in to comment.