Class: TreeHaver::LanguagePackAnalysis

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



383
384
385
# File 'lib/tree_haver/contracts.rb', line 383

def backend_ref
  @backend_ref
end

#dialectObject

Returns the value of attribute dialect

Returns:

  • (Object)

    the current value of dialect



383
384
385
# File 'lib/tree_haver/contracts.rb', line 383

def dialect
  @dialect
end

#has_errorObject

Returns the value of attribute has_error

Returns:

  • (Object)

    the current value of has_error



383
384
385
# File 'lib/tree_haver/contracts.rb', line 383

def has_error
  @has_error
end

#languageObject

Returns the value of attribute language

Returns:

  • (Object)

    the current value of language



383
384
385
# File 'lib/tree_haver/contracts.rb', line 383

def language
  @language
end

#root_typeObject

Returns the value of attribute root_type

Returns:

  • (Object)

    the current value of root_type



383
384
385
# File 'lib/tree_haver/contracts.rb', line 383

def root_type
  @root_type
end

Instance Method Details

#kindObject



384
385
386
# File 'lib/tree_haver/contracts.rb', line 384

def kind
  "tree-sitter"
end

#to_hObject



388
389
390
391
392
393
394
395
396
397
# File 'lib/tree_haver/contracts.rb', line 388

def to_h
  {
    kind: kind,
    language: language,
    **(dialect ? { dialect: dialect } : {}),
    root_type: root_type,
    has_error: has_error,
    backend_ref: backend_ref.to_h
  }
end