Class: MilkTea::AST::LocalDecl

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind:, name:, type:, value:, else_binding: nil, else_body: nil, line: nil, column: nil, recovered_else: false, destructure_bindings: nil, destructure_type_name: nil) ⇒ LocalDecl

Returns a new instance of LocalDecl.



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

def initialize(kind:, name:, type:, value:, else_binding: nil, else_body: nil, line: nil, column: nil, recovered_else: false, destructure_bindings: nil, destructure_type_name: nil) = super

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



124
125
126
# File 'lib/milk_tea/core/ast.rb', line 124

def column
  @column
end

#destructure_bindingsObject (readonly)

Returns the value of attribute destructure_bindings

Returns:

  • (Object)

    the current value of destructure_bindings



124
125
126
# File 'lib/milk_tea/core/ast.rb', line 124

def destructure_bindings
  @destructure_bindings
end

#destructure_type_nameObject (readonly)

Returns the value of attribute destructure_type_name

Returns:

  • (Object)

    the current value of destructure_type_name



124
125
126
# File 'lib/milk_tea/core/ast.rb', line 124

def destructure_type_name
  @destructure_type_name
end

#else_bindingObject (readonly)

Returns the value of attribute else_binding

Returns:

  • (Object)

    the current value of else_binding



124
125
126
# File 'lib/milk_tea/core/ast.rb', line 124

def else_binding
  @else_binding
end

#else_bodyObject (readonly)

Returns the value of attribute else_body

Returns:

  • (Object)

    the current value of else_body



124
125
126
# File 'lib/milk_tea/core/ast.rb', line 124

def else_body
  @else_body
end

#kindObject (readonly)

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



124
125
126
# File 'lib/milk_tea/core/ast.rb', line 124

def kind
  @kind
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



124
125
126
# File 'lib/milk_tea/core/ast.rb', line 124

def line
  @line
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



124
125
126
# File 'lib/milk_tea/core/ast.rb', line 124

def name
  @name
end

#recovered_elseObject (readonly)

Returns the value of attribute recovered_else

Returns:

  • (Object)

    the current value of recovered_else



124
125
126
# File 'lib/milk_tea/core/ast.rb', line 124

def recovered_else
  @recovered_else
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



124
125
126
# File 'lib/milk_tea/core/ast.rb', line 124

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



124
125
126
# File 'lib/milk_tea/core/ast.rb', line 124

def value
  @value
end