class

Parsegres::Parser

Inherits Reference < Object

Constructors

new(tokens : Array(Token))
Source

Class methods

parse(sql : String) : AST::Statement
Source

Instance methods

expect_eof

Ensures the whole input was consumed, so trailing tokens the parser didn't understand raise instead of being silently dropped.

Source
parse_statement

Entry point: handles the optional WITH clause, then delegates to parse_compound which handles set operations and ORDER BY/OFFSET/LIMIT.

Source