[][src]Enum koto_parser::Node

pub enum Node {
    Empty,
    Id(ConstantIndex),
    Lookup((LookupNode, Option<AstIndex>)),
    BoolTrue,
    BoolFalse,
    Number0,
    Number1,
    Int(ConstantIndex),
    Float(ConstantIndex),
    Str(ConstantIndex),
    Num2(Vec<AstIndex>),
    Num4(Vec<AstIndex>),
    List(Vec<AstIndex>),
    Tuple(Vec<AstIndex>),
    TempTuple(Vec<AstIndex>),
    Range {
        start: AstIndex,
        end: AstIndex,
        inclusive: bool,
    },
    RangeFrom {
        start: AstIndex,
    },
    RangeTo {
        end: AstIndex,
        inclusive: bool,
    },
    RangeFull,
    Map(Vec<(ConstantIndex, Option<AstIndex>)>),
    MainBlock {
        body: Vec<AstIndex>,
        local_count: usize,
    },
    Block(Vec<AstIndex>),
    Function(Function),
    Call {
        function: AstIndex,
        args: Vec<AstIndex>,
    },
    Import {
        from: Vec<ConstantIndex>,
        items: Vec<Vec<ConstantIndex>>,
    },
    Assign {
        target: AssignTarget,
        op: AssignOp,
        expression: AstIndex,
    },
    MultiAssign {
        targets: Vec<AssignTarget>,
        expression: AstIndex,
    },
    BinaryOp {
        op: AstOp,
        lhs: AstIndex,
        rhs: AstIndex,
    },
    If(AstIf),
    Match {
        expression: Option<AstIndex>,
        arms: Vec<MatchArm>,
    },
    Wildcard,
    Ellipsis(Option<ConstantIndex>),
    For(AstFor),
    Loop {
        body: AstIndex,
    },
    While {
        condition: AstIndex,
        body: AstIndex,
    },
    Until {
        condition: AstIndex,
        body: AstIndex,
    },
    Break,
    Continue,
    Return,
    ReturnExpression(AstIndex),
    Negate(AstIndex),
    Try(AstTry),
    Yield(AstIndex),
    Debug {
        expression_string: ConstantIndex,
        expression: AstIndex,
    },
}

Variants

Empty
BoolTrue
BoolFalse
Number0
Number1
Num2(Vec<AstIndex>)
Num4(Vec<AstIndex>)
List(Vec<AstIndex>)
Tuple(Vec<AstIndex>)
TempTuple(Vec<AstIndex>)
Range

Fields of Range

start: AstIndexend: AstIndexinclusive: bool
RangeFrom

Fields of RangeFrom

start: AstIndex
RangeTo

Fields of RangeTo

end: AstIndexinclusive: bool
RangeFull
MainBlock

Fields of MainBlock

body: Vec<AstIndex>local_count: usize
Block(Vec<AstIndex>)
Function(Function)
Call

Fields of Call

function: AstIndexargs: Vec<AstIndex>
Import

Fields of Import

from: Vec<ConstantIndex>items: Vec<Vec<ConstantIndex>>
Assign

Fields of Assign

target: AssignTargetop: AssignOpexpression: AstIndex
MultiAssign

Fields of MultiAssign

targets: Vec<AssignTarget>expression: AstIndex
BinaryOp

Fields of BinaryOp

op: AstOplhs: AstIndexrhs: AstIndex
If(AstIf)
Match

Fields of Match

expression: Option<AstIndex>arms: Vec<MatchArm>
Wildcard
For(AstFor)
Loop

Fields of Loop

body: AstIndex
While

Fields of While

condition: AstIndexbody: AstIndex
Until

Fields of Until

condition: AstIndexbody: AstIndex
Break
Continue
Return
ReturnExpression(AstIndex)
Negate(AstIndex)
Try(AstTry)
Yield(AstIndex)
Debug

Fields of Debug

expression_string: ConstantIndexexpression: AstIndex

Trait Implementations

impl Clone for Node[src]

impl Debug for Node[src]

impl Default for Node[src]

impl Display for Node[src]

impl PartialEq<Node> for Node[src]

impl StructuralPartialEq for Node[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.