tokenizer: Remove redundant token types

This commit is contained in:
James Westman 2022-02-09 15:24:56 -06:00
parent bac008296a
commit 3bdcc83c4e
4 changed files with 17 additions and 38 deletions

View file

@ -313,7 +313,7 @@ class Statement(ParseNode):
return True
token = ctx.peek_token()
if token.type != TokenType.STMT_END:
if str(token) != ";":
ctx.errors.append(CompileError("Expected `;`", token.start, token.end))
else:
ctx.next_token()