Module rune::ast[][src]

AST for the Rune language.

Re-exports

pub use self::generated::Kind;

Modules

generated

Generated modules.

Structs

AngleBracketed

Parse something bracketed, that is separated by <(T, S?)*>.

AnonExprObject

A tag object to help peeking for anonymous object case to help differentiate anonymous objects and attributes when parsing block expressions.

Attribute

Attribute like #[derive(Debug)]

Block

A block of expressions.

Braced

Parse something braced, that is separated by {(T, S?)*}.

Bracketed

Parse something bracketed, that is separated by [(T, S?)*].

CloseBrace

closing brace

CloseBracket

closing bracket

CloseParen

closing parenthesis

ExprAssign

An assign expression a = b.

ExprAwait

A return statement <expr>.await.

ExprBinary

A binary expression.

ExprBlock

A block expression.

ExprBreak

A break statement: break [expr].

ExprCall

A function call <expr>(<args>).

ExprClosure

A closure expression.

ExprContinue

A continue statement: continue [label].

ExprElse

An else branch of an if expression.

ExprElseIf

An else branch of an if expression.

ExprFieldAccess

A field access <expr>.<field>.

ExprFor

A for loop over an iterator: for i in [1, 2, 3] {}.

ExprGroup

A prioritized expression group (<expr>).

ExprIf

An if statement: if cond { true } else { false }

ExprIndex

An index get operation <target>[<index>].

ExprLet

A let expression let <name> = <expr>;

ExprLit

A literal expression.

ExprLoop

A loop expression: loop { ... }.

ExprMatch

A match expression.

ExprMatchBranch

A match branch.

ExprObject

Parse an object expression.

ExprRange

A range expression a .. b or a ..= b.

ExprReturn

A return expression return [expr].

ExprSelect

A select expression that selects over a collection of futures.

ExprTry

A try expression <expr>?.

ExprTuple

An expression to construct a literal tuple.

ExprUnary

A unary expression.

ExprVec

A literal vector.

ExprWhile

A while loop: while [expr] { ... }.

ExprWithoutBinary

Used to parse an expression without supporting an immediate binary expression.

ExprYield

A yield [expr] expression to return a value from a generator.

Field

A field as part of a struct or a tuple body.

FieldAssign

A literal object field.

File

A parsed file.

ForceSemi

Helper to force an expression to have a specific semi-colon policy.

Ident

An identifier, like foo or Hello.“.

ItemConst

A const declaration.

ItemEnum

An enum item.

ItemFn

A function item.

ItemImpl

An impl item.

ItemMod

A module item.

ItemStruct

A struct item.

ItemUse

A use item.

ItemUsePath

A single use declaration path, like foo::bar::{baz::*, biz}.

ItemVariant

An enum variant.

Label

A label, like 'foo

LitBool

The unit literal ().

LitByte

A byte literal.

LitByteStr

A string literal.

LitChar

A character literal.

LitNumber

A number literal.

LitStr

A string literal.

Local

A local variable declaration let <pattern> = <expr>;

MacroCall

A function call <expr>!(<args>).

NumberText

Configuration of a text number.

OpenBrace

opening brace

OpenBracket

opening bracket

OpenParen

opening parenthesis

Parenthesized

Parse something parenthesis, that is separated by ((T, S?)*).

PatBinding

An object item.

PatLit

A literal pattern.

PatObject

An object pattern.

PatPath

A tuple pattern.

PatTuple

A tuple pattern.

PatVec

An array pattern.

Path

A path, where each element is separated by a ::.

StrText

Configuration for a literal string.

Token

A single token encountered during parsing.

Enums

BinOp

A binary operation.

BuiltIn

A built-in identifiers that do not have a source.

Condition

An if condition.

CopySource

The source of an item that implements Copy.

Delimiter

A delimiter, {, {, or [.

Expr

A rune expression.

ExprBreakValue

Things that we can break on.

ExprField

The field being accessed.

ExprRangeLimits

The limits of the specified range.

ExprSelectBranch

A single selection branch.

FnArg

A single argument in a closure.

Item

A declaration.

ItemModBody

An item body.

ItemOrExpr

Parsing an item or an expression.

ItemStructBody

AST for a struct body.

ItemUseSegment

A use component.

ItemVariantBody

An item body declaration.

Lit

A literal value

Number

A resolved number literal.

NumberBase

The kind of a number literal.

NumberSource

The source of a number.

ObjectIdent

A literal object identifier.

ObjectKey

Possible literal object keys.

Pat

A pattern match.

PathKind

An identified path kind.

PathSegment

Part of a :: separated path.

Stmt

A statement within a block.

StmtSortKey

Key used to stort a statement into its processing order.

StrSource

The source of the literal string.

StringSource

The kind of the identifier.

UnOp

A unary operation.

Visibility

Visibility level restricted to some path: pub(self) or pub(super) or pub(crate) or pub(in some::module).