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
Builder, Lexer, Racc_arg, Racc_debug_parser, Racc_token_to_s_table
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
#_reduce_10, #_reduce_11, #_reduce_13, #_reduce_14, #_reduce_15, #_reduce_16, #_reduce_17, #_reduce_18, #_reduce_19, #_reduce_2, #_reduce_20, #_reduce_21, #_reduce_22, #_reduce_25, #_reduce_26, #_reduce_3, #_reduce_33, #_reduce_37, #_reduce_38, #_reduce_39, #_reduce_4, #_reduce_40, #_reduce_41, #_reduce_42, #_reduce_43, #_reduce_44, #_reduce_45, #_reduce_46, #_reduce_5, #_reduce_6, #_reduce_7, #_reduce_8, #_reduce_9, #_reduce_none, #initialize, #inspect, #parse
Constructor Details
This class inherits a constructor from RuboCop::AST::NodePattern::Parser
Instance Attribute Details
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
99 100 101 |
# File 'lib/rubocop/ast/node_pattern/with_meta.rb', line 99 def comments @comments end |
#tokens ⇒ Object (readonly)
Returns the value of attribute tokens.
99 100 101 |
# File 'lib/rubocop/ast/node_pattern/with_meta.rb', line 99 def tokens @tokens end |
Instance Method Details
#do_parse ⇒ Object
101 102 103 104 105 106 |
# File 'lib/rubocop/ast/node_pattern/with_meta.rb', line 101 def do_parse r = super @comments = @lexer.comments @tokens = @lexer.tokens r end |