Class: Rubycc::Front::AST::FunctionDef

Inherits:
Data
  • Object
show all
Defined in:
lib/rubycc/front/ast.rb

Overview

A function definition. return_type is the declared Rubycc::Type (int, char, void or a pointer). params is an array of Parameter (each with a non-nil name) and body is an array of statement nodes. storage records the storage-class specifier (nil/:static/:extern) for Phase B, the generator not yet acting on it. variadic is true when the parameter list ends in "..." (the variable part is reachable only through va_* in Phase B; a body that ignores it compiles and runs already).

Instance Attribute Summary collapse

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



501
502
503
# File 'lib/rubycc/front/ast.rb', line 501

def body
  @body
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



501
502
503
# File 'lib/rubycc/front/ast.rb', line 501

def name
  @name
end

#paramsObject (readonly)

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



501
502
503
# File 'lib/rubycc/front/ast.rb', line 501

def params
  @params
end

#return_typeObject (readonly)

Returns the value of attribute return_type

Returns:

  • (Object)

    the current value of return_type



501
502
503
# File 'lib/rubycc/front/ast.rb', line 501

def return_type
  @return_type
end

#storageObject (readonly)

Returns the value of attribute storage

Returns:

  • (Object)

    the current value of storage



501
502
503
# File 'lib/rubycc/front/ast.rb', line 501

def storage
  @storage
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



501
502
503
# File 'lib/rubycc/front/ast.rb', line 501

def token
  @token
end

#variadicObject (readonly)

Returns the value of attribute variadic

Returns:

  • (Object)

    the current value of variadic



501
502
503
# File 'lib/rubycc/front/ast.rb', line 501

def variadic
  @variadic
end