Skip to main content

LuaElementType

Enum LuaElementType 

Source
#[repr(u16)]
pub enum LuaElementType {
Show 105 variants Root = 0, And = 1, Break = 2, Do = 3, Else = 4, Elseif = 5, End = 6, False = 7, For = 8, Function = 9, Goto = 10, If = 11, In = 12, Local = 13, Nil = 14, Not = 15, Or = 16, Repeat = 17, Return = 18, Then = 19, True = 20, Until = 21, While = 22, Identifier = 23, Number = 24, String = 25, Plus = 26, Minus = 27, Star = 28, Slash = 29, Percent = 30, Caret = 31, Hash = 32, Ampersand = 33, Tilde = 34, Pipe = 35, LtLt = 36, GtGt = 37, SlashSlash = 38, EqEq = 39, TildeEq = 40, LtEq = 41, GtEq = 42, Lt = 43, Gt = 44, Eq = 45, LeftParen = 46, RightParen = 47, LeftBrace = 48, RightBrace = 49, LeftBracket = 50, RightBracket = 51, ColonColon = 52, Semicolon = 53, Colon = 54, Comma = 55, Dot = 56, DotDot = 57, DotDotDot = 58, Whitespace = 59, Newline = 60, Comment = 61, EndOfStream = 62, Error = 63, SourceFile = 64, FunctionDeclaration = 65, ParameterList = 66, Parameter = 67, BlockStatement = 68, LocalStatement = 69, AssignmentStatement = 70, ExpressionStatement = 71, IfStatement = 72, WhileStatement = 73, ForStatement = 74, RepeatStatement = 75, DoStatement = 76, BreakStatement = 77, ReturnStatement = 78, GotoStatement = 79, LabelStatement = 80, IdentifierExpression = 81, LiteralExpression = 82, BooleanLiteral = 83, NilLiteral = 84, ParenthesizedExpression = 85, BinaryExpression = 86, UnaryExpression = 87, CallExpression = 88, MemberExpression = 89, IndexExpression = 90, TableConstructorExpression = 91, FunctionExpression = 92, VarargExpression = 93, TableField = 94, Field = 95, FieldList = 96, ArgumentList = 97, VariableList = 98, ExpressionList = 99, NameList = 100, FunctionName = 101, FunctionBody = 102, ChunkStatement = 103, StatementList = 104,
}
Expand description

Element types for Lua.

Variants§

§

Root = 0

The root element.

§

And = 1

The and keyword.

§

Break = 2

The break keyword.

§

Do = 3

The do keyword.

§

Else = 4

The else keyword.

§

Elseif = 5

The elseif keyword.

§

End = 6

The end keyword.

§

False = 7

The false keyword.

§

For = 8

The for keyword.

§

Function = 9

The function keyword.

§

Goto = 10

The goto keyword.

§

If = 11

The if keyword.

§

In = 12

The in keyword.

§

Local = 13

The local keyword.

§

Nil = 14

The nil keyword.

§

Not = 15

The not keyword.

§

Or = 16

The or keyword.

§

Repeat = 17

The repeat keyword.

§

Return = 18

The return keyword.

§

Then = 19

The then keyword.

§

True = 20

The true keyword.

§

Until = 21

The until keyword.

§

While = 22

The while keyword.

§

Identifier = 23

An identifier.

§

Number = 24

A numeric literal.

§

String = 25

A string literal.

§

Plus = 26

The + operator.

§

Minus = 27

The - operator.

§

Star = 28

The * operator.

§

Slash = 29

The / operator.

§

Percent = 30

The % operator.

§

Caret = 31

The ^ operator.

§

Hash = 32

The # operator.

§

Ampersand = 33

The & operator.

§

Tilde = 34

The ~ operator.

§

Pipe = 35

The | operator.

§

LtLt = 36

The << operator.

§

GtGt = 37

The >> operator.

§

SlashSlash = 38

The // operator.

§

EqEq = 39

The == operator.

§

TildeEq = 40

The ~= operator.

§

LtEq = 41

The <= operator.

§

GtEq = 42

The >= operator.

§

Lt = 43

The < operator.

§

Gt = 44

The > operator.

§

Eq = 45

The = operator.

§

LeftParen = 46

The ( punctuation.

§

RightParen = 47

The ) punctuation.

§

LeftBrace = 48

The { punctuation.

§

RightBrace = 49

The } punctuation.

§

LeftBracket = 50

The [ punctuation.

§

RightBracket = 51

The ] punctuation.

§

ColonColon = 52

The :: punctuation.

§

Semicolon = 53

The ; punctuation.

§

Colon = 54

The : punctuation.

§

Comma = 55

The , punctuation.

§

Dot = 56

The . punctuation.

§

DotDot = 57

The .. punctuation.

§

DotDotDot = 58

The ... punctuation.

§

Whitespace = 59

Whitespace.

§

Newline = 60

Newline.

§

Comment = 61

A comment.

§

EndOfStream = 62

End of stream marker.

§

Error = 63

Error marker.

§

SourceFile = 64

A source file.

§

FunctionDeclaration = 65

A function declaration.

§

ParameterList = 66

A parameter list.

§

Parameter = 67

A parameter.

§

BlockStatement = 68

A block statement.

§

LocalStatement = 69

A local statement.

§

AssignmentStatement = 70

An assignment statement.

§

ExpressionStatement = 71

An expression statement.

§

IfStatement = 72

An if statement.

§

WhileStatement = 73

A while statement.

§

ForStatement = 74

A for statement.

§

RepeatStatement = 75

A repeat statement.

§

DoStatement = 76

A do statement.

§

BreakStatement = 77

A break statement.

§

ReturnStatement = 78

A return statement.

§

GotoStatement = 79

A goto statement.

§

LabelStatement = 80

A label statement.

§

IdentifierExpression = 81

An identifier expression.

§

LiteralExpression = 82

A literal expression.

§

BooleanLiteral = 83

A boolean literal.

§

NilLiteral = 84

A nil literal.

§

ParenthesizedExpression = 85

A parenthesized expression.

§

BinaryExpression = 86

A binary expression.

§

UnaryExpression = 87

A unary expression.

§

CallExpression = 88

A call expression.

§

MemberExpression = 89

A member expression.

§

IndexExpression = 90

An index expression.

§

TableConstructorExpression = 91

A table constructor expression.

§

FunctionExpression = 92

A function expression.

§

VarargExpression = 93

A vararg expression.

§

TableField = 94

A table field.

§

Field = 95

A field.

§

FieldList = 96

A field list.

§

ArgumentList = 97

Argument list.

§

VariableList = 98

Variable list.

§

ExpressionList = 99

Expression list.

§

NameList = 100

Name list.

§

FunctionName = 101

Function name.

§

FunctionBody = 102

Function body.

§

ChunkStatement = 103

Chunk statement.

§

StatementList = 104

Statement list.

Trait Implementations§

Source§

impl Clone for LuaElementType

Source§

fn clone(&self) -> LuaElementType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for LuaElementType

Source§

impl Debug for LuaElementType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for LuaElementType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl ElementType for LuaElementType

Source§

type Role = UniversalElementRole

The associated role type for this element kind.
Source§

fn role(&self) -> Self::Role

Returns the general syntactic role of this element. Read more
Source§

fn is_role(&self, role: Self::Role) -> bool

Returns true if this element matches the specified language-specific role.
Source§

fn is_universal(&self, role: UniversalElementRole) -> bool

Returns true if this element matches the specified universal role.
Source§

fn is_root(&self) -> bool

Returns true if this element represents the root of the parsed tree.
Source§

fn is_error(&self) -> bool

Returns true if this element represents an error condition.
Source§

impl Eq for LuaElementType

Source§

impl From<LuaTokenType> for LuaElementType

Source§

fn from(token: LuaTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for LuaElementType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for LuaElementType

Source§

fn eq(&self, other: &LuaElementType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for LuaElementType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for LuaElementType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V