Enum kailua_syntax::ast::Ex [] [src]

pub enum Ex {
    Oops,
    Nil,
    False,
    True,
    Num(f64),
    Str(Str),
    Varargs,
    Func(SigScopeSpanned<Block>),
    Table(Table),
    Var(Spanned<NameRef>),
    Exp(Spanned<Exp>),
    FuncCall(Spanned<Exp>, Spanned<Args>),
    MethodCall(Spanned<(Spanned<Exp>, Spanned<Name>)>, Spanned<Args>),
    Index(Spanned<Exp>, Spanned<Exp>),
    IndexName(Spanned<Exp>, Spanned<Name>),
    Un(Spanned<UnOp>, Spanned<Exp>),
    Bin(Spanned<Exp>, Spanned<BinOp>, Spanned<Exp>),
}

An expression.

Variants

A dummy node resulting from a parsing error.

Technically the type checker "evaluates" this node into an error type.

nil.

false.

true.

A number literal.

A string literal.

A difference between "string" and [[string]] is not recorded.

....

A function literal (function() ... end).

An associated scope is for the function body.

{1, 2, 3}.

A variable reference.

Another expression.

This is primarily used to keep parentheses, so that (3) is composed of two expression nodes with two different spans.

f() or f.g() (the latter will have an Ex::IndexName node).

f:g() or f.g:h() (the latter will have an Ex::IndexName node).

A span for the entire f:g or f.g:h part is separately recorded for autocompletion.

exp[exp].

exp.name. Distinguished from Ex::Index for the purpose of IDE support.

unop exp.

exp binop exp.

Trait Implementations

impl Clone for Ex
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Ex
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Ex
[src]

Formats the value using the given formatter.