how do I set a non-syntax error?

Sep 25, 2013 at 5:02 PM
Edited Sep 25, 2013 at 5:02 PM
I have a situation where I'm validating numerical range on the NumberLiteral entered. I don't want to stop the parser at that point. I want it to keep parsing -- keep the parser state valid with the proper expectations so that my intellisense continues to function. How can I do this? I just want to add to the error list directly?
Coordinator
Sep 25, 2013 at 8:39 PM
Well, you can use args.SetError method to set error in ValidateToken handler - the parser will continue, but it will try to recover, so you should have some ErrorRule's established for recovery
Sep 25, 2013 at 10:48 PM
Thanks. AddParserError (in the Reduced event) seems to do what I want.