Class: RubyNext::Language::Rewriters::Text::PacoParser
- Inherits:
-
PacoParsers::Base
- Object
- PacoParsers::Base
- RubyNext::Language::Rewriters::Text::PacoParser
- Defined in:
- lib/ruby-next/language/rewriters/text.rb
Overview
Base class for rewriting parsers which adds the #track! method
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#rewriter ⇒ Object
readonly
Returns the value of attribute rewriter.
Instance Method Summary collapse
-
#initialize(rewriter, context) ⇒ PacoParser
constructor
A new instance of PacoParser.
- #track! ⇒ Object
Methods inherited from PacoParsers::Base
Constructor Details
#initialize(rewriter, context) ⇒ PacoParser
Returns a new instance of PacoParser.
83 84 85 86 |
# File 'lib/ruby-next/language/rewriters/text.rb', line 83 def initialize(rewriter, context) @rewriter = rewriter @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
81 82 83 |
# File 'lib/ruby-next/language/rewriters/text.rb', line 81 def context @context end |
#rewriter ⇒ Object (readonly)
Returns the value of attribute rewriter.
81 82 83 |
# File 'lib/ruby-next/language/rewriters/text.rb', line 81 def rewriter @rewriter end |
Instance Method Details
#track! ⇒ Object
88 89 90 |
# File 'lib/ruby-next/language/rewriters/text.rb', line 88 def track! context.track!(rewriter) end |