expr-eval icon indicating copy to clipboard operation
expr-eval copied to clipboard

Position of syntax error in parsed string

Open bscbrn opened this issue 4 years ago • 1 comments

Hi, I am looking for a way to get some syntax error information from the parser in case there is any.

Something like the position of the offending character or token in the parsed expression string could be enough.

Is there anything I could use?

Thank you

bscbrn avatar Mar 10 '21 17:03 bscbrn

Certain types of syntax errors include the character position in the error message, but it's not consistent. That could definitely use some work, maybe including using a custom Error sub-class that includes position properties instead of just a string.

silentmatt avatar Mar 24 '21 19:03 silentmatt