Open artempyanykh opened 2 years ago
I'm trying to implement error recovery with fslexyacc. I've defined
parse_error_rich
function. The argument to the function isctx: ParseErrorContext<GeneratedParser.token>
*.I see that
ctx.ParseState
has some positional information, butParseState.ResultRange
gives some weird positions not really related to my input, and the rest of the methods requires anint
argument, however it's not really clear what sort of argument I should supply or where to get it.I'm a bit stuck at this point, and would really appreciate an advice!
Version of FsLexYacc: 11.0.0-beta1
*) Actually, getting access to the generated token type inside
parse_error_rich
is not possible because of the order of type definitions, but that's a different issue.
This is an issue I ran into recently. I am trying to figure out how to get better error information from ParseState too.
I'm trying to implement error recovery with fslexyacc. I've defined
parse_error_rich
function. The argument to the function isctx: ParseErrorContext<GeneratedParser.token>
*.I see that
ctx.ParseState
has some positional information, butParseState.ResultRange
gives some weird positions not really related to my input, and the rest of the methods requires anint
argument, however it's not really clear what sort of argument I should supply or where to get it.I'm a bit stuck at this point, and would really appreciate an advice!
Version of FsLexYacc: 11.0.0-beta1
*) Actually, getting access to the generated token type inside
parse_error_rich
is not possible because of the order of type definitions, but that's a different issue.