cpp-peglib icon indicating copy to clipboard operation
cpp-peglib copied to clipboard

[Question] Is there a way to receive typed errors (not just strings with error messages)?

Open curldivergence opened this issue 1 year ago • 0 comments

Hi! Thanks a lot for the amazing library, it's working really well for me :) But I have a question though - if I wanted to return an enum class with different types of syntax errors from the parser, what is the best way to achieve that? Right now I can only think of parsing the strings I receive in the logger callback to infer the type from them, but it feels very hacky to me :) So is there any chance you could suggest a better approach?

Thank you!

curldivergence avatar Apr 15 '23 09:04 curldivergence