Module gluon_base::ast [] [src]

Module containing the types which make up gluon's AST (Abstract Syntax Tree)

Structs

Alternative
Array
Binding
EmptyEnv
Lambda
Located
Location

Representation of a location in a source file

Span

Struct which represents a span in a source file

Spanned
TcIdent
TcIdentEnv
TcIdentEnvWrapper

Newtype wrapper which allows DisplayEnv<Ident = I> to be used where DisplayEnv<Ident = TcIdent<Ident = I> is expected

TypeBinding

Enums

Expr
LiteralEnum
Pattern

Traits

AstId

Trait representing a type that can by used as in identifier in the AST Used to allow the AST to both have a representation which has typed expressions etc as well as one which only has identifiers (useful for testing)

DisplayEnv
IdentEnv
MutVisitor

Visitor trait which walks over expressions calling visit_* on all encountered elements. By default the visit_* functions just walk the tree. If they are overriden the user will need to call walk_mut_* to continue traversing the tree.

Typed

Trait which abstracts over things that have a type. It is not guaranteed that the correct type is returned until after typechecking

Functions

located
no_loc
walk_mut_expr
walk_mut_pattern

Walks a pattern, calling visit_* on all relevant elements

Type Definitions

ASTType
LExpr

Expression which contains a location

LPattern

Pattern which contains a location