|
||||||||||
| 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.Expr_c
polyglot.ext.jl.ast.Local_c
A local variable expression.
| Field Summary | |
protected LocalInstance |
li
|
protected java.lang.String |
name
|
| Fields inherited from class polyglot.ext.jl.ast.Expr_c |
type |
| Fields inherited from class polyglot.ext.jl.ast.Term_c |
exceptions, reachable |
| Fields inherited from class polyglot.ext.jl.ast.Node_c |
del, ext, position |
| Constructor Summary | |
Local_c(Position pos,
java.lang.String name)
|
|
| Method Summary | |
java.util.List |
acceptCFG(CFGBuilder v,
java.util.List succs)
Visit this term in evaluation order. |
Node |
buildTypes(TypeBuilder tb)
Collects classes, methods, and fields from the AST rooted at this node and constructs type objects for these. |
java.lang.Object |
constantValue()
Returns the constant value of the expression, if any. |
void |
dump(CodeWriter w)
Dumps the AST. |
Term |
entry()
Return the first (sub)term performed when evaluating this term. |
Flags |
flags()
Return the access flags of the variable. |
boolean |
isConstant()
Return whether the expression evaluates to a constant. |
LocalInstance |
localInstance()
Get the local instance of the local. |
Local |
localInstance(LocalInstance li)
Set the local instance of the local. |
java.lang.String |
name()
Get the name of the local. |
Local |
name(java.lang.String name)
Set the name of the local. |
Precedence |
precedence()
Get the precedence of the local. |
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Write the local to an output file. |
java.lang.String |
toString()
|
Node |
typeCheck(TypeChecker tc)
Type check the local. |
| Methods inherited from class polyglot.ext.jl.ast.Expr_c |
booleanValue, byteValue, charValue, doubleValue, floatValue, intValue, longValue, printSubExpr, printSubExpr, shortValue, stringValue, type, type |
| 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 |
addDecls, addMembers, addMembersEnter, addMembersOverride, buildTypesEnter, buildTypesOverride, childExpectedType, copy, del, del, disambiguate, disambiguateEnter, disambiguateOverride, enterScope, enterScope, exceptionCheckEnter, exceptionCheckOverride, ext, ext, ext, ext, init, node, position, position, print, printBlock, printSubStmt, throwTypes, translate, typeCheckEnter, typeCheckOverride, visit, visitChild, visitChildren, 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.Expr |
printSubExpr, printSubExpr, type |
| 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 |
addDecls, addMembers, addMembersEnter, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, throwTypes, translate, typeCheckEnter, visitChildren |
| Methods inherited from interface polyglot.util.Copy |
copy |
| Methods inherited from interface polyglot.ast.Typed |
type |
| Methods inherited from interface polyglot.ast.Term |
exceptions, exceptions, reachable, reachable |
| Field Detail |
protected java.lang.String name
protected LocalInstance li
| Constructor Detail |
public Local_c(Position pos,
java.lang.String name)
| Method Detail |
public Precedence precedence()
precedence in interface Exprprecedence in class Expr_cpublic java.lang.String name()
name in interface Localpublic Local name(java.lang.String name)
name in interface Localpublic Flags flags()
flags in interface Variablepublic LocalInstance localInstance()
localInstance in interface Localpublic Local localInstance(LocalInstance li)
localInstance in interface Local
public Node buildTypes(TypeBuilder tb)
throws SemanticException
NodeOpsTypeSystem.
This method is called by the leave() 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.
buildTypes in interface NodeOpsbuildTypes in class Expr_cSemanticException
public Node typeCheck(TypeChecker tc)
throws SemanticException
typeCheck in interface NodeOpstypeCheck in class Node_cSemanticExceptionpublic Term entry()
entry in interface Termentry in class Term_c
public java.util.List acceptCFG(CFGBuilder v,
java.util.List succs)
acceptCFG in interface TermacceptCFG in class Term_cpublic java.lang.String toString()
toString in class Node_c
public void prettyPrint(CodeWriter w,
PrettyPrinter tr)
prettyPrint in interface NodeOpsprettyPrint in class Node_cpublic void dump(CodeWriter w)
dump in interface Nodedump in class Expr_cpublic boolean isConstant()
Expr
isConstant in interface ExprisConstant in class Expr_cpublic java.lang.Object constantValue()
Expr
constantValue in interface ExprconstantValue in class Expr_c
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||