Class: Ibex::Runtime::CST::ParseResult

Inherits:
Object
  • Object
show all
Defined in:
lib/json5/generated_parser.rb

Overview

Immutable result returned by syntax-aware parser entry points.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, syntax_root:, diagnostics:) ⇒ ParseResult

Returns a new instance of ParseResult.

RBS:

  • (value: Object, syntax_root: SyntaxNode, diagnostics: Array[Object]) -> void



1707
1708
1709
1710
1711
1712
# File 'lib/json5/generated_parser.rb', line 1707

def initialize(value:, syntax_root:, diagnostics:)
  @value = value
  @syntax_root = syntax_root
  @diagnostics = diagnostics.dup.freeze
  freeze
end

Instance Attribute Details

#diagnosticsObject (readonly)

Signature:

  • Array[Object]



1704
1705
1706
# File 'lib/json5/generated_parser.rb', line 1704

def diagnostics
  @diagnostics
end

#syntax_rootObject (readonly)

Signature:

  • SyntaxNode



1703
1704
1705
# File 'lib/json5/generated_parser.rb', line 1703

def syntax_root
  @syntax_root
end

#valueObject (readonly)

Signature:

  • Object



1702
1703
1704
# File 'lib/json5/generated_parser.rb', line 1702

def value
  @value
end