Currently, for every error that is registered with the Parser, it will create a new Token and splice it into the AST. This makes transpiling impossible since the TextRanges after the error do no longer match up with the original string input.
Goal
Do not insert errors into the AST. Instead, extend the existing errors attribute the parser already owns to also denote the errors position inside the AST.
How to demo
Tests showcasing how errors are no longer in the AST, but instead asserting the Parse::errors attribute.
Currently, for every error that is registered with the Parser, it will create a new Token and splice it into the AST. This makes transpiling impossible since the TextRanges after the error do no longer match up with the original string input.
Goal
Do not insert errors into the AST. Instead, extend the existing
errors
attribute the parser already owns to also denote the errors position inside the AST.How to demo
Tests showcasing how errors are no longer in the AST, but instead asserting the
Parse::errors
attribute.