Class: Dhaka::ParseSuccessResult
- Inherits:
-
ParseTreeCompositeNode
- Object
- ParseTreeCompositeNode
- Dhaka::ParseSuccessResult
- Defined in:
- lib/dhaka/parser/parse_result.rb
Overview
Returned on successful parsing of the input token stream.
Instance Attribute Summary collapse
-
#parse_tree ⇒ Object
(also: #syntax_tree)
Contains the parse result.
Attributes inherited from ParseTreeCompositeNode
Instance Method Summary collapse
-
#has_error? ⇒ Boolean
This is false.
-
#initialize(parse_tree) ⇒ ParseSuccessResult
constructor
:nodoc:.
-
#to_dot ⇒ Object
Returns the dot representation of the parse tree.
Methods inherited from ParseTreeCompositeNode
#head_node?, #linearize, #to_s, #tokens
Constructor Details
#initialize(parse_tree) ⇒ ParseSuccessResult
:nodoc:
7 8 9 10 |
# File 'lib/dhaka/parser/parse_result.rb', line 7 def initialize(parse_tree) #:nodoc: super @parse_tree = parse_tree end |
Instance Attribute Details
#parse_tree ⇒ Object Also known as: syntax_tree
Contains the parse result.
5 6 7 |
# File 'lib/dhaka/parser/parse_result.rb', line 5 def parse_tree @parse_tree end |
Instance Method Details
#has_error? ⇒ Boolean
This is false.
13 14 15 |
# File 'lib/dhaka/parser/parse_result.rb', line 13 def has_error? false end |