Skip to main content

LuaTokenType

Enum LuaTokenType 

Source
#[repr(u16)]
pub enum LuaTokenType {
Show 64 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,
}
Expand description

Token types for Lua.

Variants§

§

Root = 0

Root node.

§

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.

Trait Implementations§

Source§

impl Clone for LuaTokenType

Source§

fn clone(&self) -> LuaTokenType

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 LuaTokenType

Source§

impl Debug for LuaTokenType

Source§

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

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

impl<'de> Deserialize<'de> for LuaTokenType

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 Eq for LuaTokenType

Source§

impl From<LuaTokenType> for LuaElementType

Source§

fn from(token: LuaTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for LuaTokenType

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 LuaTokenType

Source§

fn eq(&self, other: &LuaTokenType) -> 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 LuaTokenType

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 LuaTokenType

Source§

impl TokenType for LuaTokenType

Source§

const END_OF_STREAM: Self = Self::EndOfStream

A constant representing the end of the input stream.
Source§

type Role = UniversalTokenRole

The associated role type for this token kind.
Source§

fn is_ignored(&self) -> bool

Returns true if this token represents trivia (whitespace, comments, etc.).
Source§

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

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

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

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

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

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

fn is_comment(&self) -> bool

Returns true if this token represents a comment.
Source§

fn is_whitespace(&self) -> bool

Returns true if this token represents whitespace.
Source§

fn is_error(&self) -> bool

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

fn is_end_of_stream(&self) -> bool

Returns true if this token represents the end of the input stream.

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