isValidToken(e) {
    return !e.isInsertedInRecovery && !isNaN(e.startOffset) && typeof e.endOffset == "number" && !isNaN(e.endOffset);
  }
Most consumed parser tokens are valid. However there are two cases in which they are not valid:

1. They were inserted during error recovery by the parser. These tokens don't really exist and should not be further processed
2. They contain invalid token ranges. This might include the special EOF token, or other tokens produced by invalid token builders.