Class: MilkTea::AST::VariantDecl

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:, type_params:, arms:, visibility:, attributes: [], line: nil, column: nil) ⇒ VariantDecl

Returns a new instance of VariantDecl.



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

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

Instance Attribute Details

#armsObject (readonly)

Returns the value of attribute arms

Returns:

  • (Object)

    the current value of arms



136
137
138
# File 'lib/milk_tea/core/ast.rb', line 136

def arms
  @arms
end

#attributesObject (readonly)

Returns the value of attribute attributes

Returns:

  • (Object)

    the current value of attributes



136
137
138
# File 'lib/milk_tea/core/ast.rb', line 136

def attributes
  @attributes
end

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



136
137
138
# File 'lib/milk_tea/core/ast.rb', line 136

def column
  @column
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



136
137
138
# File 'lib/milk_tea/core/ast.rb', line 136

def line
  @line
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



136
137
138
# File 'lib/milk_tea/core/ast.rb', line 136

def name
  @name
end

#type_paramsObject (readonly)

Returns the value of attribute type_params

Returns:

  • (Object)

    the current value of type_params



136
137
138
# File 'lib/milk_tea/core/ast.rb', line 136

def type_params
  @type_params
end

#visibilityObject (readonly)

Returns the value of attribute visibility

Returns:

  • (Object)

    the current value of visibility



136
137
138
# File 'lib/milk_tea/core/ast.rb', line 136

def visibility
  @visibility
end