As of right now, pog raises an exception in case of syntax error. It takes all symbols that are expected on the input in the particular parsing state it is in at the moment and serializes it into the string of parser error. So you'll get something like unexpected symbol <XYZ>, expected one of <A>, <B>, <C>, ....
It would be proficient for users of pog to have these expected symbols available for the purpose of building language servers. Instead of raising an exception, please return something like ParsingResult object which would contain all of these and would essentially bear the same information as the exception in case of syntax error.
As of right now,
pograises an exception in case of syntax error. It takes all symbols that are expected on the input in the particular parsing state it is in at the moment and serializes it into the string of parser error. So you'll get something likeunexpected symbol <XYZ>, expected one of <A>, <B>, <C>, ....It would be proficient for users of pog to have these expected symbols available for the purpose of building language servers. Instead of raising an exception, please return something like
ParsingResultobject which would contain all of these and would essentially bear the same information as the exception in case of syntax error.