createParseErrorFromTextAndCursor(text: Text,cursor: TreeCursor,): SyntacticParseError
Helper function to create a SyntacticParseError from the text and a cursor positioned at an error node. As the cursor from a parse tree is available, details on missing or unexpected tokens can be extracted.