Class: MilkTea::AST::VarDecl

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:, visibility:, line: nil, column: nil) ⇒ VarDecl

Returns a new instance of VarDecl.



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

def initialize(name:, type:, value:, visibility:, line: nil, column: nil) = super

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



63
64
65
# File 'lib/milk_tea/core/ast.rb', line 63

def column
  @column
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



63
64
65
# File 'lib/milk_tea/core/ast.rb', line 63

def line
  @line
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



63
64
65
# File 'lib/milk_tea/core/ast.rb', line 63

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



63
64
65
# File 'lib/milk_tea/core/ast.rb', line 63

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



63
64
65
# File 'lib/milk_tea/core/ast.rb', line 63

def value
  @value
end

#visibilityObject (readonly)

Returns the value of attribute visibility

Returns:

  • (Object)

    the current value of visibility



63
64
65
# File 'lib/milk_tea/core/ast.rb', line 63

def visibility
  @visibility
end