refu-lang / refu

Refu language
21 stars 4 forks source link

Redesign logic of parser->has_syntax_error #7

Open LefterisJP opened 7 years ago

LefterisJP commented 7 years ago

The parser currently has this variable has_syntax_error and there are functions like parser_has_syntax_error() that use it.

Try to remove this logic and instead use the newly introduced info_ctx rollback along with a smart detection of if there was an error or not between a push and a pop.

There is a TODO for this here