jmeaster30 / vore

VerbOse Regular Expressions - Regular Expression Engine with Verbose English-like Syntax
MIT License
1 stars 0 forks source link

Error handling and suggestions could be better #58

Open jmeaster30 opened 1 year ago

jmeaster30 commented 1 year ago

Sometimes the error reporting doesn't give a helpful message since it will just mention what tokens it expected. It would be helpful to gather some contextual information so we can make better guesses about what the problem is.

jmeaster30 commented 1 year ago

at least 0 in letter, digit produces the error "Unexpected token. Expected '(', '', '', or a character class."

It would be good to have the parser understand the context of where we are in the parse tree and say something like "The body of 'at least' must be a string, identifier, character class, or a sub-expression".

jmeaster30 commented 1 year ago

This specific error doesn't happen anymore but we still need better error messages so we can prepare for a proper language server extension for visual studio

jmeaster30 commented 1 year ago

Need to check loop bounds to see if they make sense

between 2 and 4 is good but between 4 and 2 doesn't really make sense

Currently, it will likely just fail I think but really not sure