Module prql_compiler::ir::pl
source · Expand description
Pipelined Language AST
Abstract Syntax Tree for the first part of PRQL compiler. It can represent basic expressions, lists, pipelines, function calls & definitions, variable declarations and more.
The central struct here is Expr and its ExprKind.
Top-level construct is a list of statements Vec<Stmt>
.
Structs§
- Expr is anything that has a value and thus a type. Most of these can contain other Expr themselves; literals should be ExprKind::Literal.
- Function called with possibly missing positional arguments. May also contain environment that is needed to evaluate the body.
- Function call.
- A name. Generally columns, tables, functions, variables. This is glorified way of writing a “vec with at least one element”.
- Represents the object that is manipulated by the pipeline transforms. Similar to a view in a database or a data frame.
- FuncCall with better typing. Returns the modified table.
Enums§
- A reference to a table that is not in scope of this query.
- An expression that may have already been converted to a type.