Class: MilkTea::IR::Constant

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, linkage_name:, type:, value:, line: nil, source_path: nil) ⇒ Constant

Returns a new instance of Constant.



10
# File 'lib/milk_tea/core/ir.rb', line 10

def initialize(name:, linkage_name:, type:, value:, line: nil, source_path: nil) = super

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



9
10
11
# File 'lib/milk_tea/core/ir.rb', line 9

def line
  @line
end

#linkage_nameObject (readonly)

Returns the value of attribute linkage_name

Returns:

  • (Object)

    the current value of linkage_name



9
10
11
# File 'lib/milk_tea/core/ir.rb', line 9

def linkage_name
  @linkage_name
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



9
10
11
# File 'lib/milk_tea/core/ir.rb', line 9

def name
  @name
end

#source_pathObject (readonly)

Returns the value of attribute source_path

Returns:

  • (Object)

    the current value of source_path



9
10
11
# File 'lib/milk_tea/core/ir.rb', line 9

def source_path
  @source_path
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



9
10
11
# File 'lib/milk_tea/core/ir.rb', line 9

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



9
10
11
# File 'lib/milk_tea/core/ir.rb', line 9

def value
  @value
end