Class: Ibex::Runtime::CST::ParseResult
- Inherits:
-
Object
- Object
- Ibex::Runtime::CST::ParseResult
- Defined in:
- lib/ibex/runtime/cst/parse_result.rb,
sig/ibex/runtime/cst/parse_result.rbs
Overview
Immutable result returned by syntax-aware parser entry points.
Instance Attribute Summary collapse
- #diagnostics ⇒ Array[untyped] readonly
- #syntax_root ⇒ SyntaxNode readonly
- #value ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(value:, syntax_root:, diagnostics:) ⇒ ParseResult
constructor
A new instance of ParseResult.
Constructor Details
#initialize(value:, syntax_root:, diagnostics:) ⇒ ParseResult
Returns a new instance of ParseResult.
14 15 16 17 18 19 |
# File 'lib/ibex/runtime/cst/parse_result.rb', line 14 def initialize(value:, syntax_root:, diagnostics:) @value = value @syntax_root = syntax_root @diagnostics = diagnostics.dup.freeze freeze end |
Instance Attribute Details
#diagnostics ⇒ Array[untyped] (readonly)
11 12 13 |
# File 'lib/ibex/runtime/cst/parse_result.rb', line 11 def diagnostics @diagnostics end |
#syntax_root ⇒ SyntaxNode (readonly)
10 11 12 |
# File 'lib/ibex/runtime/cst/parse_result.rb', line 10 def syntax_root @syntax_root end |
#value ⇒ Object (readonly)
9 10 11 |
# File 'lib/ibex/runtime/cst/parse_result.rb', line 9 def value @value end |