Class: Rubycc::Front::AST::FunctionDecl

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

Overview

A function prototype (a bare declaration with no body), e.g. "int f(int a, int b);". return_type is the declared Rubycc::Type (int, char, void or a pointer). params is an array of Parameter. storage records the storage-class specifier (nil/:static/:extern) for Phase B; inline is accepted and folded away by the parser and left off here since the generator has no use for it yet. variadic is true when the prototype ends in "..." ("int printf(const char *, ...);"), in which case params holds only the fixed, named parameters.

Instance Attribute Summary collapse

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



492
493
494
# File 'lib/rubycc/front/ast.rb', line 492

def name
  @name
end

#paramsObject (readonly)

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



492
493
494
# File 'lib/rubycc/front/ast.rb', line 492

def params
  @params
end

#return_typeObject (readonly)

Returns the value of attribute return_type

Returns:

  • (Object)

    the current value of return_type



492
493
494
# File 'lib/rubycc/front/ast.rb', line 492

def return_type
  @return_type
end

#storageObject (readonly)

Returns the value of attribute storage

Returns:

  • (Object)

    the current value of storage



492
493
494
# File 'lib/rubycc/front/ast.rb', line 492

def storage
  @storage
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



492
493
494
# File 'lib/rubycc/front/ast.rb', line 492

def token
  @token
end

#variadicObject (readonly)

Returns the value of attribute variadic

Returns:

  • (Object)

    the current value of variadic



492
493
494
# File 'lib/rubycc/front/ast.rb', line 492

def variadic
  @variadic
end