recoverInline abstract method

Token recoverInline(
  1. Parser recognizer
)

This method is called when an unexpected symbol is encountered during an inline match operation, such as {@link Parser#match}. If the error strategy successfully recovers from the match failure, this method returns the Token instance which should be treated as the successful result of the match.

This method handles the consumption of any tokens - the caller should not call {@link Parser#consume} after a successful recovery.

Note that the calling code will not report an error if this method returns successfully. The error strategy implementation is responsible for calling {@link Parser#notifyErrorListeners} as appropriate.

@param recognizer the parser instance @ if the error strategy was not able to recover from the unexpected input symbol

Implementation

Token recoverInline(Parser recognizer);