Class: RuboCop::AST::NodePattern::Parser::WithMeta
- Inherits:
-
RuboCop::AST::NodePattern::Parser
- Object
- Racc::Parser
- RuboCop::AST::NodePattern::Parser
- RuboCop::AST::NodePattern::Parser::WithMeta
- Defined in:
- lib/rubocop/ast/node_pattern/with_meta.rb
Overview
Overrides Parser to use ‘WithMeta` variants and provide additional methods
Defined Under Namespace
Constant Summary
Constants inherited from RuboCop::AST::NodePattern::Parser
Instance Attribute Summary collapse
-
#comments ⇒ Object
readonly
Returns the value of attribute comments.
-
#tokens ⇒ Object
readonly
Returns the value of attribute tokens.
Instance Method Summary collapse
Methods inherited from RuboCop::AST::NodePattern::Parser
Methods included from SimpleForwardable
Constructor Details
This class inherits a constructor from RuboCop::AST::NodePattern::Parser
Instance Attribute Details
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
98 99 100 |
# File 'lib/rubocop/ast/node_pattern/with_meta.rb', line 98 def comments @comments end |
#tokens ⇒ Object (readonly)
Returns the value of attribute tokens.
98 99 100 |
# File 'lib/rubocop/ast/node_pattern/with_meta.rb', line 98 def tokens @tokens end |
Instance Method Details
#do_parse ⇒ Object
100 101 102 103 104 105 |
# File 'lib/rubocop/ast/node_pattern/with_meta.rb', line 100 def do_parse r = super @comments = @lexer.comments @tokens = @lexer.tokens r end |