#[repr(u8)]pub enum RubyElementType {
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 RubyElementType
impl RubyElementType
pub fn is_ignored(&self) -> bool
pub fn is_keyword(&self) -> bool
Trait Implementations§
Source§impl Clone for RubyElementType
impl Clone for RubyElementType
Source§fn clone(&self) -> RubyElementType
fn clone(&self) -> RubyElementType
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 RubyElementType
impl Debug for RubyElementType
Source§impl<'de> Deserialize<'de> for RubyElementType
impl<'de> Deserialize<'de> for RubyElementType
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 RubyElementType
impl Display for RubyElementType
Source§impl ElementType for RubyElementType
impl ElementType for RubyElementType
Source§type Role = UniversalElementRole
type Role = UniversalElementRole
The associated role type for this element kind.
Source§fn is_role(&self, role: Self::Role) -> bool
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
fn is_universal(&self, role: UniversalElementRole) -> bool
Returns true if this element matches the specified universal role.
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 RubyElementType
impl Hash for RubyElementType
Source§impl PartialEq for RubyElementType
impl PartialEq for RubyElementType
Source§impl Serialize for RubyElementType
impl Serialize for RubyElementType
impl Copy for RubyElementType
impl Eq for RubyElementType
impl StructuralPartialEq for RubyElementType
Auto Trait Implementations§
impl Freeze for RubyElementType
impl RefUnwindSafe for RubyElementType
impl Send for RubyElementType
impl Sync for RubyElementType
impl Unpin for RubyElementType
impl UnwindSafe for RubyElementType
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