|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.ast.ASTree
coins.ast.Function
Declaration of a function.
| Field Summary |
| Fields inherited from interface coins.ast.TypeId |
ARRAY_T, CHAR_T, CONST_T, DOUBLE_T, ELLIPSIS_T, ENUM_BEGIN, ENUM_END, FLOAT_T, FUNCTION_T, INT_T, LONG_DOUBLE_T, LONG_LONG_T, LONG_T, NO_DIMENSION_T, OFFSET_T, POINTER_T, RESTRICT_T, RETURN_T, S_AUTO, S_EXTERN, S_INLINE, S_NONE, S_REGISTER, S_STATIC, SHORT_T, SIGNED_T, SIZE_T, STRUCT_BEGIN, STRUCT_END, UNION_BEGIN, UNION_END, UNSIGNED_T, VOID_T, VOLATILE_T |
| Constructor Summary | |
Function(Declarator decl,
Stmnt body)
Constructs a function. |
|
| Method Summary | |
void |
accept(Visitor v)
Is a method for the visitor pattern. |
java.lang.String |
fileName()
Returns the file name including the statement. |
DeclaratorList |
getArguments()
Returns the argument list. |
Stmnt |
getBody()
Returns the function body. |
ASTree |
getLeft()
Returns an argument list. |
java.lang.String |
getName()
Returns the function name. |
ASTree |
getRight()
Returns a function body. |
int |
getStorage()
Returns the storage specifiers. |
protected java.lang.String |
getTag()
Returns the type of this node. |
byte[] |
getType()
Returns the encoded function type. |
int |
lineNumber()
Returns the line number of the statement. |
protected void |
putSeparator(java.lang.StringBuffer sbuf)
|
void |
setLeft(ASTree _left)
|
void |
setRight(ASTree _right)
|
| Methods inherited from class coins.ast.ASTree |
rightToString, toString, toString1 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Function(Declarator decl,
Stmnt body)
Note: to parse a function declaration, the parser first tries
to construct Declarator object but it discards that
object and constructs Function object for substitution.
decl - the function name, the return type,
and the argument list.body - the function body.| Method Detail |
public ASTree getLeft()
getLeft in class ASTreepublic ASTree getRight()
getRight in class ASTreepublic void setLeft(ASTree _left)
setLeft in class ASTreepublic void setRight(ASTree _right)
setRight in class ASTreepublic void accept(Visitor v)
ASTreeatXXX() on the given visitor, where
XXX is the class name of the node object.
accept in class ASTreepublic java.lang.String fileName()
Stmnt
fileName in interface Stmntpublic int lineNumber()
Stmnt
lineNumber in interface Stmntpublic java.lang.String getName()
public byte[] getType()
public int getStorage()
public DeclaratorList getArguments()
public Stmnt getBody()
protected java.lang.String getTag()
ASTreetoString().
getTag in class ASTreeprotected void putSeparator(java.lang.StringBuffer sbuf)
putSeparator in class ASTree
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||