Module pr

Source
Expand description

PR, or “Parser Representation” is an AST representation of parsed PRQL. It takes LR tokens and converts them into a more structured form which understands expressions, such as tuples & functions.

Re-exports§

pub use crate::lexer::lr::Literal;
pub use crate::span::Span;

Structs§

Annotation
BinaryExpr
Expression with two operands and an operator, such as 1 + 2.
Expr
Expr is anything that has a value and thus a type. Most of these can contain other Expr themselves; literals should be ExprKind::Literal.
Func
Function called with possibly missing positional arguments. May also contain environment that is needed to evaluate the body.
FuncCall
Function call.
FuncParam
GenericTypeParam
Ident
A name. Generally columns, tables, functions, variables. This is glorified way of writing a “vec with at least one element”.
ImportDef
ModuleDef
Pipeline
A value and a series of functions that are to be applied to that value one after another.
QueryDef
Stmt
Ty
TyFunc
TypeDef
UnaryExpr
Expression with one operand and an operator, such as -1.
VarDef

Enums§

BinOp
ExprKind
IndirectionKind
PrimitiveSet
Built-in sets.
StmtKind
TyKind
TyTupleField
UnOp
VarDefKind

Functions§

display_ident
display_ident_part

Type Aliases§

InterpolateItem
Range
SwitchCase