#[repr(u8)]pub enum RubyElementType {
Show 142 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,
UnlessStatement = 126,
UntilStatement = 127,
ForStatement = 128,
CaseStatement = 129,
WhenClause = 130,
BeginStatement = 131,
RescueClause = 132,
EnsureClause = 133,
ReturnStatement = 134,
IfExpression = 135,
CallExpression = 136,
MemberAccess = 137,
ParameterList = 138,
ArgumentList = 139,
Error = 140,
Equal = 141,
}Expand description
Element types for Ruby.
Variants§
Identifier = 0
An identifier.
GlobalVariable = 1
A global variable (e.g., $stdout).
InstanceVariable = 2
An instance variable (e.g., @name).
ClassVariable = 3
A class variable (e.g., @@name).
Constant = 4
A constant (e.g., MATH).
IntegerLiteral = 5
An integer literal.
FloatLiteral = 6
A float literal.
StringLiteral = 7
A string literal.
Literal = 8
A general literal.
Symbol = 9
A symbol (e.g., :name).
RegexLiteral = 10
A regular expression literal.
If = 11
The if keyword.
Unless = 12
The unless keyword.
Elsif = 13
The elsif keyword.
Else = 14
The else keyword.
Case = 15
The case keyword.
When = 16
The when keyword.
Then = 17
The then keyword.
For = 18
The for keyword.
While = 19
The while keyword.
Until = 20
The until keyword.
Break = 21
The break keyword.
Next = 22
The next keyword.
Redo = 23
The redo keyword.
Retry = 24
The retry keyword.
Return = 25
The return keyword.
Yield = 26
The yield keyword.
Def = 27
The def keyword.
Class = 28
The class keyword.
Module = 29
The module keyword.
End = 30
The end keyword.
Lambda = 31
The lambda keyword.
Proc = 32
The proc keyword.
Begin = 33
The begin keyword.
Rescue = 34
The rescue keyword.
Ensure = 35
The ensure keyword.
Raise = 36
The raise keyword.
Require = 37
The require keyword.
Load = 38
The load keyword.
Include = 39
The include keyword.
Extend = 40
The extend keyword.
Prepend = 41
The prepend keyword.
And = 42
The and keyword.
Or = 43
The or keyword.
Not = 44
The not keyword.
In = 45
The in keyword.
True = 46
The true keyword.
False = 47
The false keyword.
Nil = 48
The nil keyword.
Super = 49
The super keyword.
Self_ = 50
The self keyword.
Alias = 51
The alias keyword.
Undef = 52
The undef keyword.
Defined = 53
The defined? keyword.
Do = 54
The do keyword.
Plus = 55
Plus operator +.
Minus = 56
Minus operator -.
Multiply = 57
Multiply operator *.
Divide = 58
Divide operator /.
Modulo = 59
Modulo operator %.
Power = 60
Power operator **.
EqualEqual = 61
Equality operator ==.
NotEqual = 62
Inequality operator !=.
Less = 63
Less than operator <.
Greater = 64
Greater than operator >.
LessEqual = 65
Less than or equal operator <=.
GreaterEqual = 66
Greater than or equal operator >=.
EqualEqualEqual = 67
Case equality operator ===.
Spaceship = 68
Spaceship operator <=>.
Assign = 69
Assignment operator =.
PlusAssign = 70
Plus assignment operator +=.
MinusAssign = 71
Minus assignment operator -=.
MultiplyAssign = 72
Multiply assignment operator *=.
DivideAssign = 73
Divide assignment operator /=.
ModuloAssign = 74
Modulo assignment operator %=.
PowerAssign = 75
Power assignment operator **=.
BitAnd = 76
Bitwise AND operator &.
BitOr = 77
Bitwise OR operator |.
Xor = 78
Bitwise XOR operator ^.
LogicalNot = 79
Logical NOT operator !.
Tilde = 80
Bitwise NOT operator ~.
LeftShift = 81
Left shift operator <<.
RightShift = 82
Right shift operator >>.
AndAssign = 83
AND assignment operator &=.
OrAssign = 84
OR assignment operator |=.
XorAssign = 85
XOR assignment operator ^=.
LeftShiftAssign = 86
Left shift assignment operator <<=.
RightShiftAssign = 87
Right shift assignment operator >>=.
AndAnd = 88
Logical AND operator &&.
OrOr = 89
Logical OR operator ||.
OrOrAssign = 90
OR OR assignment operator ||=.
AndAndAssign = 91
AND AND assignment operator &&=.
Question = 92
Question mark ?.
DotDot = 93
Range operator ...
DotDotDot = 94
Range operator ....
Match = 95
Match operator =~.
NotMatch = 96
Not match operator !~.
LeftParen = 97
Left parenthesis (.
RightParen = 98
Right parenthesis ).
LeftBracket = 99
Left bracket [.
RightBracket = 100
Right bracket ].
LeftBrace = 101
Left brace {.
RightBrace = 102
Right brace }.
Comma = 103
Comma ,.
Colon = 104
Colon :.
Semicolon = 105
Semicolon ;.
Dot = 106
Dot ..
DoubleColon = 107
Double colon ::.
At = 108
At symbol @.
Dollar = 109
Dollar sign $.
Whitespace = 110
Whitespace.
Newline = 111
Newline.
Comment = 112
Comment.
Eof = 113
End of file.
Invalid = 114
Invalid token.
Root = 115
Root element.
BinaryExpression = 116
A binary expression.
UnaryExpression = 117
A unary expression.
LiteralExpression = 118
A literal expression.
ParenExpression = 119
A parenthesized expression.
ParenthesizedExpression = 120
A parenthesized expression (alternative).
MethodDefinition = 121
A method definition.
ClassDefinition = 122
A class definition.
ModuleDefinition = 123
A module definition.
IfStatement = 124
An if statement.
WhileStatement = 125
A while statement.
UnlessStatement = 126
An unless statement.
UntilStatement = 127
An until statement.
ForStatement = 128
A for statement.
CaseStatement = 129
A case statement.
WhenClause = 130
A when clause.
BeginStatement = 131
A begin statement.
RescueClause = 132
A rescue clause.
EnsureClause = 133
An ensure clause.
ReturnStatement = 134
A return statement.
IfExpression = 135
An if expression.
CallExpression = 136
A call expression.
MemberAccess = 137
A member access expression.
ParameterList = 138
A parameter list.
ArgumentList = 139
An argument list.
Error = 140
An error element.
Equal = 141
Equal operator =.
Implementations§
Source§impl RubyElementType
impl RubyElementType
Sourcepub fn is_ignored(&self) -> bool
pub fn is_ignored(&self) -> bool
Returns true if the element is ignored (whitespace, newline, or comment).
Sourcepub fn is_keyword(&self) -> bool
pub fn is_keyword(&self) -> bool
Returns true if the element is a keyword.
Trait Implementations§
Source§impl Clone for RubyElementType
impl Clone for RubyElementType
Source§fn clone(&self) -> RubyElementType
fn clone(&self) -> RubyElementType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more