Class: TreeHaver::Backends::Citrus::Tree Private
- Inherits:
-
TreeHaver::Base::Tree
- Object
- TreeHaver::Base::Tree
- TreeHaver::Backends::Citrus::Tree
- Defined in:
- lib/tree_haver/backends/citrus.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Citrus tree wrapper
Wraps a Citrus::Match (which represents the parse tree) to provide
tree-sitter-compatible API.
Inherits from Base::Tree to get shared methods like #errors, #warnings,
#comments, #has_error?, and #inspect.
Instance Attribute Summary collapse
-
#root_match ⇒ Citrus::Match
readonly
private
The raw Citrus::Match root.
Attributes inherited from TreeHaver::Base::Tree
Instance Method Summary collapse
-
#initialize(root_match, source) ⇒ Tree
constructor
private
A new instance of Tree.
-
#root_node ⇒ Object
private
Methods inherited from TreeHaver::Base::Tree
#comments, #edit, #errors, #has_error?, #inspect, #warnings
Constructor Details
#initialize(root_match, source) ⇒ Tree
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Tree.
285 286 287 288 |
# File 'lib/tree_haver/backends/citrus.rb', line 285 def initialize(root_match, source) @root_match = root_match super(root_match, source: source) end |
Instance Attribute Details
#root_match ⇒ Citrus::Match (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The raw Citrus::Match root
283 284 285 |
# File 'lib/tree_haver/backends/citrus.rb', line 283 def root_match @root_match end |