pub enum RubySyntaxKind {
Show 134 variants
Identifier,
GlobalVariable,
InstanceVariable,
ClassVariable,
Constant,
IntegerLiteral,
FloatLiteral,
StringLiteral,
Literal,
Symbol,
RegexLiteral,
If,
Unless,
Elsif,
Else,
Case,
When,
Then,
For,
While,
Until,
Break,
Next,
Redo,
Retry,
Return,
Yield,
Def,
Class,
Module,
End,
Lambda,
Proc,
Begin,
Rescue,
Ensure,
Raise,
Require,
Load,
Include,
Extend,
Prepend,
And,
Or,
Not,
In,
True,
False,
Nil,
Super,
Self_,
Alias,
Undef,
Defined,
Do,
Plus,
Minus,
Multiply,
Divide,
Modulo,
Power,
EqualEqual,
NotEqual,
Less,
Greater,
LessEqual,
GreaterEqual,
EqualEqualEqual,
Spaceship,
Assign,
Equal,
PlusAssign,
MinusAssign,
MultiplyAssign,
DivideAssign,
ModuloAssign,
PowerAssign,
BitAnd,
BitOr,
Xor,
LogicalNot,
Tilde,
LeftShift,
RightShift,
AndAssign,
OrAssign,
XorAssign,
LeftShiftAssign,
RightShiftAssign,
AndAnd,
OrOr,
OrOrAssign,
AndAndAssign,
Question,
DotDot,
DotDotDot,
Match,
NotMatch,
LeftParen,
RightParen,
LeftBracket,
RightBracket,
LeftBrace,
RightBrace,
Comma,
Colon,
Semicolon,
Dot,
DoubleColon,
At,
Dollar,
Whitespace,
Newline,
Comment,
Eof,
Invalid,
Root,
BinaryExpression,
UnaryExpression,
LiteralExpression,
ParenExpression,
ParenthesizedExpression,
MethodDefinition,
ClassDefinition,
ModuleDefinition,
IfStatement,
WhileStatement,
ReturnStatement,
IfExpression,
CallExpression,
MemberAccess,
ParameterList,
ArgumentList,
Error,
}Expand description
Ruby 令牌种类
Variants§
Identifier
GlobalVariable
InstanceVariable
ClassVariable
Constant
IntegerLiteral
FloatLiteral
StringLiteral
Literal
Symbol
RegexLiteral
If
Unless
Elsif
Else
Case
When
Then
For
While
Until
Break
Next
Redo
Retry
Return
Yield
Def
Class
Module
End
Lambda
Proc
Begin
Rescue
Ensure
Raise
Require
Load
Include
Extend
Prepend
And
Or
Not
In
True
False
Nil
Super
Self_
Alias
Undef
Defined
Do
Plus
Minus
Multiply
Divide
Modulo
Power
EqualEqual
NotEqual
Less
Greater
LessEqual
GreaterEqual
EqualEqualEqual
Spaceship
Assign
Equal
PlusAssign
MinusAssign
MultiplyAssign
DivideAssign
ModuloAssign
PowerAssign
BitAnd
BitOr
Xor
LogicalNot
Tilde
LeftShift
RightShift
AndAssign
OrAssign
XorAssign
LeftShiftAssign
RightShiftAssign
AndAnd
OrOr
OrOrAssign
AndAndAssign
Question
DotDot
DotDotDot
Match
NotMatch
LeftParen
RightParen
LeftBracket
RightBracket
LeftBrace
RightBrace
Comma
Colon
Semicolon
Dot
DoubleColon
At
Dollar
Whitespace
Newline
Comment
Eof
Invalid
Root
BinaryExpression
UnaryExpression
LiteralExpression
ParenExpression
ParenthesizedExpression
MethodDefinition
ClassDefinition
ModuleDefinition
IfStatement
WhileStatement
ReturnStatement
IfExpression
CallExpression
MemberAccess
ParameterList
ArgumentList
Error
Implementations§
Source§impl RubySyntaxKind
impl RubySyntaxKind
pub fn is_ignored(&self) -> bool
pub fn is_keyword(&self) -> bool
Trait Implementations§
Source§impl Clone for RubySyntaxKind
impl Clone for RubySyntaxKind
Source§fn clone(&self) -> RubySyntaxKind
fn clone(&self) -> RubySyntaxKind
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 RubySyntaxKind
impl Debug for RubySyntaxKind
Source§impl Display for RubySyntaxKind
impl Display for RubySyntaxKind
Source§impl ElementType for RubySyntaxKind
impl ElementType for RubySyntaxKind
Source§type Role = UniversalElementRole
type Role = UniversalElementRole
The associated role type for this element kind.
Source§fn is_error(&self) -> bool
fn is_error(&self) -> bool
Returns true if this element represents an error condition. Read more
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 Hash for RubySyntaxKind
impl Hash for RubySyntaxKind
Source§impl PartialEq for RubySyntaxKind
impl PartialEq for RubySyntaxKind
Source§impl Serialize for RubySyntaxKind
impl Serialize for RubySyntaxKind
Source§impl TokenType for RubySyntaxKind
impl TokenType for RubySyntaxKind
Source§const END_OF_STREAM: Self = Self::Eof
const END_OF_STREAM: Self = Self::Eof
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_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_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_error(&self) -> bool
fn is_error(&self) -> bool
Returns true if this token represents an error condition. Read more
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_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 RubySyntaxKind
impl Eq for RubySyntaxKind
impl StructuralPartialEq for RubySyntaxKind
Auto Trait Implementations§
impl Freeze for RubySyntaxKind
impl RefUnwindSafe for RubySyntaxKind
impl Send for RubySyntaxKind
impl Sync for RubySyntaxKind
impl Unpin for RubySyntaxKind
impl UnwindSafe for RubySyntaxKind
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