Class: Pegparse::ParserContext
- Inherits:
-
Object
- Object
- Pegparse::ParserContext
- Defined in:
- lib/pegparse/parser_context.rb
Instance Attribute Summary collapse
-
#borrowed_areas ⇒ Object
Returns the value of attribute borrowed_areas.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#line_counter ⇒ Object
Returns the value of attribute line_counter.
-
#rule_stack ⇒ Object
Returns the value of attribute rule_stack.
-
#scanner ⇒ Object
Returns the value of attribute scanner.
Instance Method Summary collapse
-
#initialize(scanner) ⇒ ParserContext
constructor
A new instance of ParserContext.
Constructor Details
#initialize(scanner) ⇒ ParserContext
Returns a new instance of ParserContext.
12 13 14 15 16 17 18 |
# File 'lib/pegparse/parser_context.rb', line 12 def initialize(scanner) @scanner = scanner @rule_stack = [] @errors = Pegparse::ParserErrors.new @line_counter = Pegparse::LineCounter.new @borrowed_areas = Pegparse::BorrowedAreas.new end |
Instance Attribute Details
#borrowed_areas ⇒ Object
Returns the value of attribute borrowed_areas.
10 11 12 |
# File 'lib/pegparse/parser_context.rb', line 10 def borrowed_areas @borrowed_areas end |
#errors ⇒ Object
Returns the value of attribute errors.
8 9 10 |
# File 'lib/pegparse/parser_context.rb', line 8 def errors @errors end |
#line_counter ⇒ Object
Returns the value of attribute line_counter.
9 10 11 |
# File 'lib/pegparse/parser_context.rb', line 9 def line_counter @line_counter end |
#rule_stack ⇒ Object
Returns the value of attribute rule_stack.
7 8 9 |
# File 'lib/pegparse/parser_context.rb', line 7 def rule_stack @rule_stack end |
#scanner ⇒ Object
Returns the value of attribute scanner.
6 7 8 |
# File 'lib/pegparse/parser_context.rb', line 6 def scanner @scanner end |