diff --git a/src/parser/parser.ts b/src/parser/parser.ts index 5664277..1f68fba 100644 --- a/src/parser/parser.ts +++ b/src/parser/parser.ts @@ -45,7 +45,7 @@ export default class Parser { private expect(type: TokenType, err: string) { const prev = this.eat(); - console.log(prev); + if (!prev || prev.type != type) { LogError(`On line ${prev.line}: Kin Error: ${err}`); process.exit(1);