Class: MilkTea::AST::SourceFile

Inherits:
Data
  • Object
show all
Defined in:
lib/milk_tea/core/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(module_name:, module_kind:, imports:, directives:, declarations:, line: nil, node_ids: {}, node_path_ids: {}) ⇒ SourceFile

Returns a new instance of SourceFile.



52
# File 'lib/milk_tea/core/ast.rb', line 52

def initialize(module_name:, module_kind:, imports:, directives:, declarations:, line: nil, node_ids: {}, node_path_ids: {}) = super

Instance Attribute Details

#declarationsObject (readonly)

Returns the value of attribute declarations

Returns:

  • (Object)

    the current value of declarations



51
52
53
# File 'lib/milk_tea/core/ast.rb', line 51

def declarations
  @declarations
end

#directivesObject (readonly)

Returns the value of attribute directives

Returns:

  • (Object)

    the current value of directives



51
52
53
# File 'lib/milk_tea/core/ast.rb', line 51

def directives
  @directives
end

#importsObject (readonly)

Returns the value of attribute imports

Returns:

  • (Object)

    the current value of imports



51
52
53
# File 'lib/milk_tea/core/ast.rb', line 51

def imports
  @imports
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



51
52
53
# File 'lib/milk_tea/core/ast.rb', line 51

def line
  @line
end

#module_kindObject (readonly)

Returns the value of attribute module_kind

Returns:

  • (Object)

    the current value of module_kind



51
52
53
# File 'lib/milk_tea/core/ast.rb', line 51

def module_kind
  @module_kind
end

#module_nameObject (readonly)

Returns the value of attribute module_name

Returns:

  • (Object)

    the current value of module_name



51
52
53
# File 'lib/milk_tea/core/ast.rb', line 51

def module_name
  @module_name
end

#node_idsObject (readonly)

Returns the value of attribute node_ids

Returns:

  • (Object)

    the current value of node_ids



51
52
53
# File 'lib/milk_tea/core/ast.rb', line 51

def node_ids
  @node_ids
end

#node_path_idsObject (readonly)

Returns the value of attribute node_path_ids

Returns:

  • (Object)

    the current value of node_path_ids



51
52
53
# File 'lib/milk_tea/core/ast.rb', line 51

def node_path_ids
  @node_path_ids
end