|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpolyglot.ext.jl.ast.Node_c
polyglot.ext.jl.ast.Term_c
polyglot.ext.jl.ast.Formal_c
A Formal represents a formal parameter for a procedure
or catch block. It consists of a type and a variable identifier.
| Field Summary |
| Fields inherited from class polyglot.ext.jl.ast.Term_c |
exceptions |
| Fields inherited from class polyglot.ext.jl.ast.Node_c |
del, ext, position |
| Constructor Summary | |
Formal_c(Position pos,
Flags flags,
TypeNode type,
java.lang.String name)
|
|
| Method Summary | |
java.util.List |
acceptCFG(CFGBuilder v,
java.util.List succs)
Visit this node, calling calling v.edge() for each successor in succs, if data flows on that edge. |
void |
addDecls(Context c)
Add any declarations to the context that should be in scope when visiting later sibling nodes. |
Node |
buildTypes(TypeBuilder tb)
Build type objects for the formal. |
Type |
declType()
Get the type of the formal. |
Node |
disambiguate(AmbiguityRemover ar)
Remove any remaining ambiguities from the AST. |
void |
dump(CodeWriter w)
Dump the AST node for debugging purposes. |
Term |
entry()
Return the first (sub)term performed when evaluating this term. |
Flags |
flags()
Get the flags of the formal. |
Formal |
flags(Flags flags)
Set the flags of the formal. |
LocalInstance |
localInstance()
Get the local instance of the formal. |
Formal |
localInstance(LocalInstance li)
Set the local instance of the formal. |
java.lang.String |
name()
Get the name of the formal. |
Formal |
name(java.lang.String name)
Set the name of the formal. |
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Write the formal to an output file. |
protected Formal_c |
reconstruct(TypeNode type)
Reconstruct the formal. |
java.lang.String |
toString()
|
TypeNode |
type()
Get the type node of the formal. |
Formal |
type(TypeNode type)
Set the type node of the formal. |
Node |
typeCheck(TypeChecker tc)
Type check the formal. |
Node |
visitChildren(NodeVisitor v)
Visit the children of the formal. |
| Methods inherited from class polyglot.ext.jl.ast.Term_c |
exceptionCheck, exceptions, exceptions, listEntry, reachable, reachable |
| Methods inherited from class polyglot.ext.jl.ast.Node_c |
addMembers, addMembersEnter, addMembersOverride, buildTypesEnter, buildTypesOverride, childExpectedType, copy, del, del, disambiguateEnter, disambiguateOverride, enterScope, enterScope, exceptionCheckEnter, exceptionCheckOverride, ext, ext, ext, ext, init, node, position, position, print, printBlock, printSubStmt, throwTypes, translate, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface polyglot.ast.Term |
exceptions, exceptions, reachable, reachable |
| Methods inherited from interface polyglot.ast.Node |
childExpectedType, del, del, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList |
| Methods inherited from interface polyglot.ast.JL |
init, node |
| Methods inherited from interface polyglot.ast.NodeOps |
addMembers, addMembersEnter, buildTypesEnter, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, throwTypes, translate, typeCheckEnter |
| Methods inherited from interface polyglot.util.Copy |
copy |
| Constructor Detail |
public Formal_c(Position pos,
Flags flags,
TypeNode type,
java.lang.String name)
| Method Detail |
public Type declType()
declType in interface VarDeclpublic Flags flags()
flags in interface VarDeclpublic Formal flags(Flags flags)
flags in interface Formalpublic TypeNode type()
type in interface VarDeclpublic Formal type(TypeNode type)
type in interface Formalpublic java.lang.String name()
name in interface VarDeclpublic Formal name(java.lang.String name)
name in interface Formalpublic LocalInstance localInstance()
localInstance in interface VarDeclpublic Formal localInstance(LocalInstance li)
localInstance in interface Formalprotected Formal_c reconstruct(TypeNode type)
public Node visitChildren(NodeVisitor v)
visitChildren in interface NodeOpsvisitChildren in class Node_cpublic void addDecls(Context c)
NodeOps
addDecls in interface NodeOpsaddDecls in class Node_c
public void prettyPrint(CodeWriter w,
PrettyPrinter tr)
prettyPrint in interface NodeOpsprettyPrint in class Node_c
public Node buildTypes(TypeBuilder tb)
throws SemanticException
buildTypes in interface NodeOpsbuildTypes in class Node_cSemanticException
public Node disambiguate(AmbiguityRemover ar)
throws SemanticException
NodeOpsleave() method of the
visitor. The method should perform work that should be done
after visiting the children of the node. The method may return
this or a new copy of the node which will be
installed as a child of the node's parent.
disambiguate in interface NodeOpsdisambiguate in class Node_cSemanticException
public Node typeCheck(TypeChecker tc)
throws SemanticException
typeCheck in interface NodeOpstypeCheck in class Node_cSemanticExceptionpublic Term entry()
Term
entry in interface Termentry in class Term_c
public java.util.List acceptCFG(CFGBuilder v,
java.util.List succs)
Term
acceptCFG in interface TermacceptCFG in class Term_cpublic void dump(CodeWriter w)
Node
dump in interface Nodedump in class Node_cpublic java.lang.String toString()
toString in class Node_c
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||