#[repr(u8)]pub enum RubyTokenType {
Show 134 variants
Identifier = 0,
GlobalVariable = 1,
InstanceVariable = 2,
ClassVariable = 3,
Constant = 4,
IntegerLiteral = 5,
FloatLiteral = 6,
StringLiteral = 7,
Literal = 8,
Symbol = 9,
RegexLiteral = 10,
If = 11,
Unless = 12,
Elsif = 13,
Else = 14,
Case = 15,
When = 16,
Then = 17,
For = 18,
While = 19,
Until = 20,
Break = 21,
Next = 22,
Redo = 23,
Retry = 24,
Return = 25,
Yield = 26,
Def = 27,
Class = 28,
Module = 29,
End = 30,
Lambda = 31,
Proc = 32,
Begin = 33,
Rescue = 34,
Ensure = 35,
Raise = 36,
Require = 37,
Load = 38,
Include = 39,
Extend = 40,
Prepend = 41,
And = 42,
Or = 43,
Not = 44,
In = 45,
True = 46,
False = 47,
Nil = 48,
Super = 49,
Self_ = 50,
Alias = 51,
Undef = 52,
Defined = 53,
Do = 54,
Plus = 55,
Minus = 56,
Multiply = 57,
Divide = 58,
Modulo = 59,
Power = 60,
EqualEqual = 61,
NotEqual = 62,
Less = 63,
Greater = 64,
LessEqual = 65,
GreaterEqual = 66,
EqualEqualEqual = 67,
Spaceship = 68,
Assign = 69,
PlusAssign = 70,
MinusAssign = 71,
MultiplyAssign = 72,
DivideAssign = 73,
ModuloAssign = 74,
PowerAssign = 75,
BitAnd = 76,
BitOr = 77,
Xor = 78,
LogicalNot = 79,
Tilde = 80,
LeftShift = 81,
RightShift = 82,
AndAssign = 83,
OrAssign = 84,
XorAssign = 85,
LeftShiftAssign = 86,
RightShiftAssign = 87,
AndAnd = 88,
OrOr = 89,
OrOrAssign = 90,
AndAndAssign = 91,
Question = 92,
DotDot = 93,
DotDotDot = 94,
Match = 95,
NotMatch = 96,
LeftParen = 97,
RightParen = 98,
LeftBracket = 99,
RightBracket = 100,
LeftBrace = 101,
RightBrace = 102,
Comma = 103,
Colon = 104,
Semicolon = 105,
Dot = 106,
DoubleColon = 107,
At = 108,
Dollar = 109,
Whitespace = 110,
Newline = 111,
Comment = 112,
Eof = 113,
Invalid = 114,
Root = 115,
BinaryExpression = 116,
UnaryExpression = 117,
LiteralExpression = 118,
ParenExpression = 119,
ParenthesizedExpression = 120,
MethodDefinition = 121,
ClassDefinition = 122,
ModuleDefinition = 123,
IfStatement = 124,
WhileStatement = 125,
ReturnStatement = 126,
IfExpression = 127,
CallExpression = 128,
MemberAccess = 129,
ParameterList = 130,
ArgumentList = 131,
Error = 132,
Equal = 133,
}Variants§
Identifier = 0
GlobalVariable = 1
InstanceVariable = 2
ClassVariable = 3
Constant = 4
IntegerLiteral = 5
FloatLiteral = 6
StringLiteral = 7
Literal = 8
Symbol = 9
RegexLiteral = 10
If = 11
Unless = 12
Elsif = 13
Else = 14
Case = 15
When = 16
Then = 17
For = 18
While = 19
Until = 20
Break = 21
Next = 22
Redo = 23
Retry = 24
Return = 25
Yield = 26
Def = 27
Class = 28
Module = 29
End = 30
Lambda = 31
Proc = 32
Begin = 33
Rescue = 34
Ensure = 35
Raise = 36
Require = 37
Load = 38
Include = 39
Extend = 40
Prepend = 41
And = 42
Or = 43
Not = 44
In = 45
True = 46
False = 47
Nil = 48
Super = 49
Self_ = 50
Alias = 51
Undef = 52
Defined = 53
Do = 54
Plus = 55
Minus = 56
Multiply = 57
Divide = 58
Modulo = 59
Power = 60
EqualEqual = 61
NotEqual = 62
Less = 63
Greater = 64
LessEqual = 65
GreaterEqual = 66
EqualEqualEqual = 67
Spaceship = 68
Assign = 69
PlusAssign = 70
MinusAssign = 71
MultiplyAssign = 72
DivideAssign = 73
ModuloAssign = 74
PowerAssign = 75
BitAnd = 76
BitOr = 77
Xor = 78
LogicalNot = 79
Tilde = 80
LeftShift = 81
RightShift = 82
AndAssign = 83
OrAssign = 84
XorAssign = 85
LeftShiftAssign = 86
RightShiftAssign = 87
AndAnd = 88
OrOr = 89
OrOrAssign = 90
AndAndAssign = 91
Question = 92
DotDot = 93
DotDotDot = 94
Match = 95
NotMatch = 96
LeftParen = 97
RightParen = 98
LeftBracket = 99
RightBracket = 100
LeftBrace = 101
RightBrace = 102
Comma = 103
Colon = 104
Semicolon = 105
Dot = 106
DoubleColon = 107
At = 108
Dollar = 109
Whitespace = 110
Newline = 111
Comment = 112
Eof = 113
Invalid = 114
Root = 115
BinaryExpression = 116
UnaryExpression = 117
LiteralExpression = 118
ParenExpression = 119
ParenthesizedExpression = 120
MethodDefinition = 121
ClassDefinition = 122
ModuleDefinition = 123
IfStatement = 124
WhileStatement = 125
ReturnStatement = 126
IfExpression = 127
CallExpression = 128
MemberAccess = 129
ParameterList = 130
ArgumentList = 131
Error = 132
Equal = 133
Implementations§
Source§impl RubyTokenType
impl RubyTokenType
pub fn is_ignored(&self) -> bool
pub fn is_keyword(&self) -> bool
Trait Implementations§
Source§impl Clone for RubyTokenType
impl Clone for RubyTokenType
Source§fn clone(&self) -> RubyTokenType
fn clone(&self) -> RubyTokenType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RubyTokenType
impl Debug for RubyTokenType
Source§impl<'de> Deserialize<'de> for RubyTokenType
impl<'de> Deserialize<'de> for RubyTokenType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Display for RubyTokenType
impl Display for RubyTokenType
Source§impl From<RubyTokenType> for RubyElementType
impl From<RubyTokenType> for RubyElementType
Source§fn from(token: RubyTokenType) -> Self
fn from(token: RubyTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for RubyTokenType
impl Hash for RubyTokenType
Source§impl PartialEq for RubyTokenType
impl PartialEq for RubyTokenType
Source§impl Serialize for RubyTokenType
impl Serialize for RubyTokenType
Source§impl TokenType for RubyTokenType
impl TokenType for RubyTokenType
Source§const END_OF_STREAM: Self = Self::Error
const END_OF_STREAM: Self = Self::Error
A constant representing the end of the input stream. Read more
Source§type Role = UniversalTokenRole
type Role = UniversalTokenRole
The associated role type for this token kind.
Source§fn is_ignored(&self) -> bool
fn is_ignored(&self) -> bool
Returns true if this token represents trivia (whitespace, comments, etc.). Read more
Source§fn is_role(&self, role: Self::Role) -> bool
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
fn is_universal(&self, role: UniversalTokenRole) -> bool
Returns true if this token matches the specified universal role.
Source§fn is_comment(&self) -> bool
fn is_comment(&self) -> bool
Returns true if this token represents a comment. Read more
Source§fn is_whitespace(&self) -> bool
fn is_whitespace(&self) -> bool
Returns true if this token represents whitespace. Read more
Source§fn is_error(&self) -> bool
fn is_error(&self) -> bool
Returns true if this token represents an error condition. Read more
Source§fn is_end_of_stream(&self) -> bool
fn is_end_of_stream(&self) -> bool
Returns true if this token represents the end of the input stream. Read more
impl Copy for RubyTokenType
impl Eq for RubyTokenType
impl StructuralPartialEq for RubyTokenType
Auto Trait Implementations§
impl Freeze for RubyTokenType
impl RefUnwindSafe for RubyTokenType
impl Send for RubyTokenType
impl Sync for RubyTokenType
impl Unpin for RubyTokenType
impl UnwindSafe for RubyTokenType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more