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.
292 293 294 295 |
# File 'lib/tree_haver/backends/citrus.rb', line 292 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
290 291 292 |
# File 'lib/tree_haver/backends/citrus.rb', line 290 def root_match @root_match end |