Closed ronaldtse closed 3 years ago
This one turned out to be not so easy to implement. In short, parslet(the library we are currently using for dsl parsing) does support detailed errors display by calling error.cause.ascii_tree
, but this particular method greatly depends on how rules were constructed, if you are using maybe
modificator for your rule it treats it like additional rule and discards it from error.cause.ascii_tree
completely, that's why all our errors are always pointing to the first line of the dsl code. I played a little bit with the rules and it seems that we can surpass that restriction by changing the structure of our rules, which will require some additional time to implement. Working further on this one.
@ronaldtse implemented in https://github.com/lutaml/lutaml-uml/pull/89
When a lutaml file contains invalid syntax, such as:
The parser fails with an unintelligible message:
P.S. The correct format above is: