PerchSecurity / dendrol

🌴 The STIX2 Pattern expression parser for humans
https://pypi.org/project/dendrol/
MIT License
25 stars 3 forks source link

Improve parser error experience #1

Open theY4Kman opened 5 years ago

theY4Kman commented 5 years ago

Currently, when a Pattern expression fails to parse, only the line and column numbers are given to aid in resolving the issue.

It would be nice if the source Pattern expression were reproduced, with an arrow pointing to the location of the problem. It'd be even nicer if pretty terminal colours were used. Nicer still if a more semantically substantial message than "no viable alternative at input" were displayed.