Enum flycatcher_parser::ast::Ast[][src]

pub enum Ast {
    NullLiteral,
    BooleanLiteral(bool),
    FloatLiteral(f64),
    IntegerLiteral(i64),
    IdentifierLiteral(String),
    StringLiteral(String),
    BinaryExpression(Opcode, Box<AstMeta>, Box<AstMeta>),
    IndexExpression(Vec<AstMeta>),
    BracketIndex(Box<AstMeta>),
    PositiveUnary(Box<AstMeta>),
    NegativeUnary(Box<AstMeta>),
}
Expand description

A list of possible AST expressions.

Variants

NullLiteral
BooleanLiteral

A boolean literal, either true or false.

Tuple Fields of BooleanLiteral

0: bool
FloatLiteral

A 64-bit floating point number literal.

Tuple Fields of FloatLiteral

0: f64
IntegerLiteral

A 64-bit integer literal.

Tuple Fields of IntegerLiteral

0: i64
IdentifierLiteral

An identifier literal.

Tuple Fields of IdentifierLiteral

0: String
StringLiteral

A string literal.

Tuple Fields of StringLiteral

0: String
BinaryExpression

A binary expression with two operands.

1 + 1

Tuple Fields of BinaryExpression

0: Opcode1: Box<AstMeta>2: Box<AstMeta>
IndexExpression

An expression made with an unlimited amount of indexes, for example, item1["item2"].item3[item4()]

Tuple Fields of IndexExpression

0: Vec<AstMeta>
BracketIndex

An index for an IndexExpression that may contain something other than an identifier.

item1["BracketIndexHere"]

Tuple Fields of BracketIndex

0: Box<AstMeta>
PositiveUnary

This is caused by using the + operator at the start of an operand, such as +10.

Tuple Fields of PositiveUnary

0: Box<AstMeta>
NegativeUnary

This is caused by using the - operator at the start of an operand, such as -10.

Tuple Fields of NegativeUnary

0: Box<AstMeta>

Trait Implementations

Formats the value using the given formatter. Read more

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

Performs the conversion.

Performs the conversion.

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.