Class: RuboCop::AST::NodePattern::Lexer
- Inherits:
-
LexerRex
- Object
- LexerRex
- RuboCop::AST::NodePattern::Lexer
- Defined in:
- lib/rubocop/ast/node_pattern/lexer.rb
Overview
Lexer class for ‘NodePattern`
Doc on how this fits in the compiling process:
/docs/modules/ROOT/pages/node_pattern.adoc
Direct Known Subclasses
Constant Summary collapse
- Error =
ScanError
Instance Attribute Summary collapse
-
#comments ⇒ Object
readonly
Returns the value of attribute comments.
-
#source_buffer ⇒ Object
readonly
Returns the value of attribute source_buffer.
-
#tokens ⇒ Object
readonly
Returns the value of attribute tokens.
Instance Method Summary collapse
-
#initialize(source) ⇒ Lexer
constructor
A new instance of Lexer.
Constructor Details
#initialize(source) ⇒ Lexer
Returns a new instance of Lexer.
31 32 33 34 35 |
# File 'lib/rubocop/ast/node_pattern/lexer.rb', line 31 def initialize(source) @tokens = [] super() parse(source) end |
Instance Attribute Details
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
29 30 31 |
# File 'lib/rubocop/ast/node_pattern/lexer.rb', line 29 def comments @comments end |
#source_buffer ⇒ Object (readonly)
Returns the value of attribute source_buffer.
29 30 31 |
# File 'lib/rubocop/ast/node_pattern/lexer.rb', line 29 def source_buffer @source_buffer end |
#tokens ⇒ Object (readonly)
Returns the value of attribute tokens.
29 30 31 |
# File 'lib/rubocop/ast/node_pattern/lexer.rb', line 29 def tokens @tokens end |