Enum mamba::check::ast::NodeTy

source ·
pub enum NodeTy {
Show 81 variants Import { from: Option<Box<ASTTy>>, import: Vec<ASTTy>, alias: Vec<ASTTy>, }, Class { ty: StringName, args: Vec<ASTTy>, parents: Vec<ASTTy>, body: Option<Box<ASTTy>>, }, Parent { ty: StringName, args: Vec<ASTTy>, }, Reassign { left: Box<ASTTy>, right: Box<ASTTy>, op: NodeOp, }, VariableDef { mutable: bool, var: Box<ASTTy>, ty: Option<Name>, expr: Option<Box<ASTTy>>, forward: Vec<ASTTy>, }, FunDef { pure: bool, id: Box<ASTTy>, args: Vec<ASTTy>, ret: Option<Name>, raises: Vec<ASTTy>, body: Option<Box<ASTTy>>, }, AnonFun { args: Vec<ASTTy>, body: Box<ASTTy>, }, Raises { expr_or_stmt: Box<ASTTy>, errors: Vec<ASTTy>, }, Raise { error: Box<ASTTy>, }, Handle { expr_or_stmt: Box<ASTTy>, cases: Vec<ASTTy>, }, With { resource: Box<ASTTy>, alias: Option<(Box<ASTTy>, bool, Option<Name>)>, expr: Box<ASTTy>, }, FunctionCall { name: StringName, args: Vec<ASTTy>, }, PropertyCall { instance: Box<ASTTy>, property: Box<ASTTy>, }, Id { lit: String, }, ExpressionType { expr: Box<ASTTy>, mutable: bool, ty: Option<Name>, }, TypeDef { ty: StringName, isa: Option<Name>, body: Option<Box<ASTTy>>, }, TypeAlias { ty: StringName, isa: Name, conditions: Vec<ASTTy>, }, Condition { cond: Box<ASTTy>, el: Option<Box<ASTTy>>, }, FunArg { vararg: bool, mutable: bool, var: Box<ASTTy>, ty: Option<Name>, default: Option<Box<ASTTy>>, }, Dict { elements: Vec<(ASTTy, ASTTy)>, }, DictBuilder { from: Box<ASTTy>, to: Box<ASTTy>, conditions: Vec<ASTTy>, }, Set { elements: Vec<ASTTy>, }, SetBuilder { item: Box<ASTTy>, conditions: Vec<ASTTy>, }, List { elements: Vec<ASTTy>, }, ListBuilder { item: Box<ASTTy>, conditions: Vec<ASTTy>, }, Tuple { elements: Vec<ASTTy>, }, Range { from: Box<ASTTy>, to: Box<ASTTy>, inclusive: bool, step: Option<Box<ASTTy>>, }, Slice { from: Box<ASTTy>, to: Box<ASTTy>, inclusive: bool, step: Option<Box<ASTTy>>, }, Index { item: Box<ASTTy>, range: Box<ASTTy>, }, Block { statements: Vec<ASTTy>, }, Real { lit: String, }, Int { lit: String, }, ENum { num: String, exp: String, }, Str { lit: String, expressions: Vec<ASTTy>, }, DocStr { lit: String, }, Bool { lit: bool, }, Add { left: Box<ASTTy>, right: Box<ASTTy>, }, AddU { expr: Box<ASTTy>, }, Sub { left: Box<ASTTy>, right: Box<ASTTy>, }, SubU { expr: Box<ASTTy>, }, Mul { left: Box<ASTTy>, right: Box<ASTTy>, }, Div { left: Box<ASTTy>, right: Box<ASTTy>, }, FDiv { left: Box<ASTTy>, right: Box<ASTTy>, }, Mod { left: Box<ASTTy>, right: Box<ASTTy>, }, Pow { left: Box<ASTTy>, right: Box<ASTTy>, }, Sqrt { expr: Box<ASTTy>, }, BAnd { left: Box<ASTTy>, right: Box<ASTTy>, }, BOr { left: Box<ASTTy>, right: Box<ASTTy>, }, BXOr { left: Box<ASTTy>, right: Box<ASTTy>, }, BOneCmpl { expr: Box<ASTTy>, }, BLShift { left: Box<ASTTy>, right: Box<ASTTy>, }, BRShift { left: Box<ASTTy>, right: Box<ASTTy>, }, Le { left: Box<ASTTy>, right: Box<ASTTy>, }, Ge { left: Box<ASTTy>, right: Box<ASTTy>, }, Leq { left: Box<ASTTy>, right: Box<ASTTy>, }, Geq { left: Box<ASTTy>, right: Box<ASTTy>, }, Is { left: Box<ASTTy>, right: Box<ASTTy>, }, IsN { left: Box<ASTTy>, right: Box<ASTTy>, }, Eq { left: Box<ASTTy>, right: Box<ASTTy>, }, Neq { left: Box<ASTTy>, right: Box<ASTTy>, }, IsA { left: Box<ASTTy>, right: Box<ASTTy>, }, IsNA { left: Box<ASTTy>, right: Box<ASTTy>, }, Not { expr: Box<ASTTy>, }, And { left: Box<ASTTy>, right: Box<ASTTy>, }, Or { left: Box<ASTTy>, right: Box<ASTTy>, }, IfElse { cond: Box<ASTTy>, then: Box<ASTTy>, el: Option<Box<ASTTy>>, }, Match { cond: Box<ASTTy>, cases: Vec<ASTTy>, }, Case { cond: Box<ASTTy>, body: Box<ASTTy>, }, For { expr: Box<ASTTy>, col: Box<ASTTy>, body: Box<ASTTy>, }, In { left: Box<ASTTy>, right: Box<ASTTy>, }, While { cond: Box<ASTTy>, body: Box<ASTTy>, }, Break, Continue, Return { expr: Box<ASTTy>, }, ReturnEmpty, Underscore, Undefined, Pass, Question { left: Box<ASTTy>, right: Box<ASTTy>, }, QuestionOp { expr: Box<ASTTy>, }, Empty,
}

Variants§

§

Import

Fields

§from: Option<Box<ASTTy>>
§import: Vec<ASTTy>
§alias: Vec<ASTTy>
§

Class

Fields

§args: Vec<ASTTy>
§parents: Vec<ASTTy>
§body: Option<Box<ASTTy>>
§

Parent

Fields

§args: Vec<ASTTy>
§

Reassign

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

VariableDef

Fields

§mutable: bool
§var: Box<ASTTy>
§expr: Option<Box<ASTTy>>
§forward: Vec<ASTTy>
§

FunDef

Fields

§pure: bool
§id: Box<ASTTy>
§args: Vec<ASTTy>
§ret: Option<Name>
§raises: Vec<ASTTy>
§body: Option<Box<ASTTy>>
§

AnonFun

Fields

§args: Vec<ASTTy>
§body: Box<ASTTy>
§

Raises

Fields

§expr_or_stmt: Box<ASTTy>
§errors: Vec<ASTTy>
§

Raise

Fields

§error: Box<ASTTy>
§

Handle

Fields

§expr_or_stmt: Box<ASTTy>
§cases: Vec<ASTTy>
§

With

Fields

§resource: Box<ASTTy>
§alias: Option<(Box<ASTTy>, bool, Option<Name>)>
§expr: Box<ASTTy>
§

FunctionCall

Fields

§args: Vec<ASTTy>
§

PropertyCall

Fields

§instance: Box<ASTTy>
§property: Box<ASTTy>
§

Id

Fields

§lit: String
§

ExpressionType

Fields

§expr: Box<ASTTy>
§mutable: bool
§

TypeDef

Fields

§isa: Option<Name>
§body: Option<Box<ASTTy>>
§

TypeAlias

Fields

§isa: Name
§conditions: Vec<ASTTy>
§

Condition

Fields

§cond: Box<ASTTy>
§

FunArg

Fields

§vararg: bool
§mutable: bool
§var: Box<ASTTy>
§default: Option<Box<ASTTy>>
§

Dict

Fields

§elements: Vec<(ASTTy, ASTTy)>
§

DictBuilder

Fields

§from: Box<ASTTy>
§to: Box<ASTTy>
§conditions: Vec<ASTTy>
§

Set

Fields

§elements: Vec<ASTTy>
§

SetBuilder

Fields

§item: Box<ASTTy>
§conditions: Vec<ASTTy>
§

List

Fields

§elements: Vec<ASTTy>
§

ListBuilder

Fields

§item: Box<ASTTy>
§conditions: Vec<ASTTy>
§

Tuple

Fields

§elements: Vec<ASTTy>
§

Range

Fields

§from: Box<ASTTy>
§to: Box<ASTTy>
§inclusive: bool
§step: Option<Box<ASTTy>>
§

Slice

Fields

§from: Box<ASTTy>
§to: Box<ASTTy>
§inclusive: bool
§step: Option<Box<ASTTy>>
§

Index

Fields

§item: Box<ASTTy>
§range: Box<ASTTy>
§

Block

Fields

§statements: Vec<ASTTy>
§

Real

Fields

§lit: String
§

Int

Fields

§lit: String
§

ENum

Fields

§num: String
§exp: String
§

Str

Fields

§lit: String
§expressions: Vec<ASTTy>
§

DocStr

Fields

§lit: String
§

Bool

Fields

§lit: bool
§

Add

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

AddU

Fields

§expr: Box<ASTTy>
§

Sub

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

SubU

Fields

§expr: Box<ASTTy>
§

Mul

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

Div

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

FDiv

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

Mod

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

Pow

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

Sqrt

Fields

§expr: Box<ASTTy>
§

BAnd

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

BOr

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

BXOr

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

BOneCmpl

Fields

§expr: Box<ASTTy>
§

BLShift

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

BRShift

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

Le

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

Ge

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

Leq

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

Geq

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

Is

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

IsN

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

Eq

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

Neq

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

IsA

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

IsNA

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

Not

Fields

§expr: Box<ASTTy>
§

And

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

Or

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

IfElse

Fields

§cond: Box<ASTTy>
§then: Box<ASTTy>
§

Match

Fields

§cond: Box<ASTTy>
§cases: Vec<ASTTy>
§

Case

Fields

§cond: Box<ASTTy>
§body: Box<ASTTy>
§

For

Fields

§expr: Box<ASTTy>
§col: Box<ASTTy>
§body: Box<ASTTy>
§

In

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

While

Fields

§cond: Box<ASTTy>
§body: Box<ASTTy>
§

Break

§

Continue

§

Return

Fields

§expr: Box<ASTTy>
§

ReturnEmpty

§

Underscore

§

Undefined

§

Pass

§

Question

Fields

§left: Box<ASTTy>
§right: Box<ASTTy>
§

QuestionOp

Fields

§expr: Box<ASTTy>
§

Empty

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.