Class: TreeHaver::BackendCapability

Inherits:
Struct
  • Object
show all
Defined in:
lib/tree_haver/contracts.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#backend_refObject

Returns the value of attribute backend_ref

Returns:

  • (Object)

    the current value of backend_ref



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def backend_ref
  @backend_ref
end

#diagnosticsObject

Returns the value of attribute diagnostics

Returns:

  • (Object)

    the current value of diagnostics



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def diagnostics
  @diagnostics
end

#grammar_inventoryObject

Returns the value of attribute grammar_inventory

Returns:

  • (Object)

    the current value of grammar_inventory



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def grammar_inventory
  @grammar_inventory
end

#known_fieldsObject

Returns the value of attribute known_fields

Returns:

  • (Object)

    the current value of known_fields



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def known_fields
  @known_fields
end

#known_node_kindsObject

Returns the value of attribute known_node_kinds

Returns:

  • (Object)

    the current value of known_node_kinds



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def known_node_kinds
  @known_node_kinds
end

#languageObject

Returns the value of attribute language

Returns:

  • (Object)

    the current value of language



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def language
  @language
end

#language_versionObject

Returns the value of attribute language_version

Returns:

  • (Object)

    the current value of language_version



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def language_version
  @language_version
end

#native_node_accessObject

Returns the value of attribute native_node_access

Returns:

  • (Object)

    the current value of native_node_access



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def native_node_access
  @native_node_access
end

#normalized_tree_supportObject

Returns the value of attribute normalized_tree_support

Returns:

  • (Object)

    the current value of normalized_tree_support



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def normalized_tree_support
  @normalized_tree_support
end

#parse_error_behaviorObject

Returns the value of attribute parse_error_behavior

Returns:

  • (Object)

    the current value of parse_error_behavior



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def parse_error_behavior
  @parse_error_behavior
end

#parser_identityObject

Returns the value of attribute parser_identity

Returns:

  • (Object)

    the current value of parser_identity



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def parser_identity
  @parser_identity
end

#render_strategiesObject

Returns the value of attribute render_strategies

Returns:

  • (Object)

    the current value of render_strategies



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def render_strategies
  @render_strategies
end

#semantic_role_supportObject

Returns the value of attribute semantic_role_support

Returns:

  • (Object)

    the current value of semantic_role_support



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def semantic_role_support
  @semantic_role_support
end

#source_fragment_supportObject

Returns the value of attribute source_fragment_support

Returns:

  • (Object)

    the current value of source_fragment_support



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def source_fragment_support
  @source_fragment_support
end

#source_span_supportObject

Returns the value of attribute source_span_support

Returns:

  • (Object)

    the current value of source_span_support



73
74
75
# File 'lib/tree_haver/contracts.rb', line 73

def source_span_support
  @source_span_support
end

Instance Method Details

#to_hObject



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/tree_haver/contracts.rb', line 91

def to_h
  {
    backend_ref: backend_ref.to_h,
    language: language,
    parser_identity: parser_identity.to_h,
    language_version: language_version.to_h,
    parse_error_behavior: parse_error_behavior,
    source_span_support: source_span_support,
    source_fragment_support: source_fragment_support,
    render_strategies: render_strategies,
    semantic_role_support: semantic_role_support,
    normalized_tree_support: normalized_tree_support,
    native_node_access: native_node_access,
    known_node_kinds: known_node_kinds || [],
    known_fields: known_fields || [],
    grammar_inventory: grammar_inventory,
    diagnostics: diagnostics
  }
end