pub enum ParserError {
ExpectedIdent(u32, u32, String),
MissingFromStatement(u32, u32),
ExpectedKeyword(u32, u32, &'static str, String),
ExpectedSymbol(u32, u32, Symbol, String),
UnexpectedToken(u32, u32, String),
ExpectedType(u32, u32),
UnexpectedEof,
}Expand description
Errors that can occur during syntactic analysis.
These errors are produced by the parser when the token sequence does not match the expected grammar of EventQL.
Variants§
ExpectedIdent(u32, u32, String)
Expected an identifier but found something else.
Fields: (line, column, found_token)
MissingFromStatement(u32, u32)
The query is missing a required FROM statement.
Fields: (line, column)
ExpectedKeyword(u32, u32, &'static str, String)
Expected a specific keyword but found something else.
Fields: (line, column, expected_keyword, found_token)
ExpectedSymbol(u32, u32, Symbol, String)
Expected a specific symbol but found something else.
Fields: (line, column, expected_symbol, found_token)
UnexpectedToken(u32, u32, String)
An unexpected token was encountered.
Fields: (line, column, found_token)
This is a general error for tokens that don’t fit the current parse context.
ExpectedType(u32, u32)
Expected a type name but found something else.
Fields: (line, column, found_token)
This occurs when defining a type conversion operation but the left side is not a type.
UnexpectedEof
The input ended unexpectedly while parsing.
This occurs when the parser expects more tokens but encounters the end of the token stream.