Class ParseError

    • Constructor Detail

      • ParseError

        public ParseError​(Tokenizer.Token unexpectedToken)
        Constructs a new ParseError for an unexpected token.
        Parameters:
        unexpectedToken - the unexpected token
      • ParseError

        public ParseError​(Tokenizer.Token unexpectedToken,
                          Tokenizer.TokenType expected)
        Constructs a new ParseError for an unexpected token and an expected token.
        Parameters:
        unexpectedToken - the unexpected token
        expected - the expected token
      • ParseError

        public ParseError​(String message)
        Constructs a new ParseError with a generic message.
        Parameters:
        message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.
    • Method Detail

      • unexpectedChar

        public static ParseError unexpectedChar​(char expected,
                                                char found,
                                                int position)
        Constructs a new ParseError for an unexpected character.
        Parameters:
        expected - the expected character
        found - the found character
        position - the position
        Returns:
        a new ParseError