Class: MilkTea::AST::ConstDecl

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:, value:, block_body: nil, visibility:, attributes: [], line: nil, column: nil) ⇒ ConstDecl

Returns a new instance of ConstDecl.



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

def initialize(name:, type:, value:, block_body: nil, 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



60
61
62
# File 'lib/milk_tea/core/ast.rb', line 60

def attributes
  @attributes
end

#block_bodyObject (readonly)

Returns the value of attribute block_body

Returns:

  • (Object)

    the current value of block_body



60
61
62
# File 'lib/milk_tea/core/ast.rb', line 60

def block_body
  @block_body
end

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



60
61
62
# File 'lib/milk_tea/core/ast.rb', line 60

def column
  @column
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



60
61
62
# File 'lib/milk_tea/core/ast.rb', line 60

def line
  @line
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



60
61
62
# File 'lib/milk_tea/core/ast.rb', line 60

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



60
61
62
# File 'lib/milk_tea/core/ast.rb', line 60

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



60
61
62
# File 'lib/milk_tea/core/ast.rb', line 60

def value
  @value
end

#visibilityObject (readonly)

Returns the value of attribute visibility

Returns:

  • (Object)

    the current value of visibility



60
61
62
# File 'lib/milk_tea/core/ast.rb', line 60

def visibility
  @visibility
end