Class: MilkTea::AST::FunctionDef

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:, params:, return_type:, body:, visibility:, async:, const: false, attributes: [], line: nil, column: nil) ⇒ FunctionDef

Returns a new instance of FunctionDef.



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

def initialize(name:, type_params:, params:, return_type:, body:, visibility:, async:, const: false, attributes: [], line: nil, column: nil) = super

Instance Attribute Details

#asyncObject (readonly)

Returns the value of attribute async

Returns:

  • (Object)

    the current value of async



108
109
110
# File 'lib/milk_tea/core/ast.rb', line 108

def async
  @async
end

#attributesObject (readonly)

Returns the value of attribute attributes

Returns:

  • (Object)

    the current value of attributes



108
109
110
# File 'lib/milk_tea/core/ast.rb', line 108

def attributes
  @attributes
end

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



108
109
110
# File 'lib/milk_tea/core/ast.rb', line 108

def body
  @body
end

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



108
109
110
# File 'lib/milk_tea/core/ast.rb', line 108

def column
  @column
end

#constObject (readonly)

Returns the value of attribute const

Returns:

  • (Object)

    the current value of const



108
109
110
# File 'lib/milk_tea/core/ast.rb', line 108

def const
  @const
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



108
109
110
# File 'lib/milk_tea/core/ast.rb', line 108

def line
  @line
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



108
109
110
# File 'lib/milk_tea/core/ast.rb', line 108

def name
  @name
end

#paramsObject (readonly)

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



108
109
110
# File 'lib/milk_tea/core/ast.rb', line 108

def params
  @params
end

#return_typeObject (readonly)

Returns the value of attribute return_type

Returns:

  • (Object)

    the current value of return_type



108
109
110
# File 'lib/milk_tea/core/ast.rb', line 108

def return_type
  @return_type
end

#type_paramsObject (readonly)

Returns the value of attribute type_params

Returns:

  • (Object)

    the current value of type_params



108
109
110
# File 'lib/milk_tea/core/ast.rb', line 108

def type_params
  @type_params
end

#visibilityObject (readonly)

Returns the value of attribute visibility

Returns:

  • (Object)

    the current value of visibility



108
109
110
# File 'lib/milk_tea/core/ast.rb', line 108

def visibility
  @visibility
end