Class: Rubycc::Front::AST::FunctionDecl
- Inherits:
-
Data
- Object
- Data
- Rubycc::Front::AST::FunctionDecl
- 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
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#return_type ⇒ Object
readonly
Returns the value of attribute return_type.
-
#storage ⇒ Object
readonly
Returns the value of attribute storage.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#variadic ⇒ Object
readonly
Returns the value of attribute variadic.
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name
492 493 494 |
# File 'lib/rubycc/front/ast.rb', line 492 def name @name end |
#params ⇒ Object (readonly)
Returns the value of attribute params
492 493 494 |
# File 'lib/rubycc/front/ast.rb', line 492 def params @params end |
#return_type ⇒ Object (readonly)
Returns the value of attribute return_type
492 493 494 |
# File 'lib/rubycc/front/ast.rb', line 492 def return_type @return_type end |
#storage ⇒ Object (readonly)
Returns the value of attribute storage
492 493 494 |
# File 'lib/rubycc/front/ast.rb', line 492 def storage @storage end |
#token ⇒ Object (readonly)
Returns the value of attribute token
492 493 494 |
# File 'lib/rubycc/front/ast.rb', line 492 def token @token end |
#variadic ⇒ Object (readonly)
Returns the value of attribute variadic
492 493 494 |
# File 'lib/rubycc/front/ast.rb', line 492 def variadic @variadic end |