Class: TreeHaver::ParseErrorTolerance
- Inherits:
-
Struct
- Object
- Struct
- TreeHaver::ParseErrorTolerance
- Defined in:
- lib/tree_haver/contracts.rb
Instance Attribute Summary collapse
-
#backend_ref ⇒ Object
Returns the value of attribute backend_ref.
-
#behavior ⇒ Object
Returns the value of attribute behavior.
-
#diagnostics ⇒ Object
Returns the value of attribute diagnostics.
-
#error_nodes ⇒ Object
Returns the value of attribute error_nodes.
-
#language ⇒ Object
Returns the value of attribute language.
-
#tolerates_errors ⇒ Object
Returns the value of attribute tolerates_errors.
Instance Method Summary collapse
Instance Attribute Details
#backend_ref ⇒ Object
Returns the value of attribute backend_ref
122 123 124 |
# File 'lib/tree_haver/contracts.rb', line 122 def backend_ref @backend_ref end |
#behavior ⇒ Object
Returns the value of attribute behavior
122 123 124 |
# File 'lib/tree_haver/contracts.rb', line 122 def behavior @behavior end |
#diagnostics ⇒ Object
Returns the value of attribute diagnostics
122 123 124 |
# File 'lib/tree_haver/contracts.rb', line 122 def diagnostics @diagnostics end |
#error_nodes ⇒ Object
Returns the value of attribute error_nodes
122 123 124 |
# File 'lib/tree_haver/contracts.rb', line 122 def error_nodes @error_nodes end |
#language ⇒ Object
Returns the value of attribute language
122 123 124 |
# File 'lib/tree_haver/contracts.rb', line 122 def language @language end |
#tolerates_errors ⇒ Object
Returns the value of attribute tolerates_errors
122 123 124 |
# File 'lib/tree_haver/contracts.rb', line 122 def tolerates_errors @tolerates_errors end |
Instance Method Details
#to_h ⇒ Object
124 125 126 127 128 129 130 131 132 133 |
# File 'lib/tree_haver/contracts.rb', line 124 def to_h { backend_ref: backend_ref.to_h, language: language, behavior: behavior, tolerates_errors: tolerates_errors, error_nodes: (error_nodes || []).map(&:to_h), diagnostics: diagnostics } end |