Class: MilkTea::AST::UnionDecl

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, c_name:, fields:, visibility:, attributes: [], line: nil, column: nil) ⇒ UnionDecl

Returns a new instance of UnionDecl.



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

def initialize(name:, c_name:, fields:, visibility:, attributes: [], line: nil, column: nil) = super

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes

Returns:

  • (Object)

    the current value of attributes



81
82
83
# File 'lib/milk_tea/core/ast.rb', line 81

def attributes
  @attributes
end

#c_nameObject (readonly)

Returns the value of attribute c_name

Returns:

  • (Object)

    the current value of c_name



81
82
83
# File 'lib/milk_tea/core/ast.rb', line 81

def c_name
  @c_name
end

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



81
82
83
# File 'lib/milk_tea/core/ast.rb', line 81

def column
  @column
end

#fieldsObject (readonly)

Returns the value of attribute fields

Returns:

  • (Object)

    the current value of fields



81
82
83
# File 'lib/milk_tea/core/ast.rb', line 81

def fields
  @fields
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



81
82
83
# File 'lib/milk_tea/core/ast.rb', line 81

def line
  @line
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



81
82
83
# File 'lib/milk_tea/core/ast.rb', line 81

def name
  @name
end

#visibilityObject (readonly)

Returns the value of attribute visibility

Returns:

  • (Object)

    the current value of visibility



81
82
83
# File 'lib/milk_tea/core/ast.rb', line 81

def visibility
  @visibility
end