|
|||||||||
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.AmbExpr_c
public class AmbExpr_c
An AmbExpr
is an ambiguous AST node composed of a single
identifier that must resolve to an expression.
Field Summary | |
---|---|
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 | |
---|---|
AmbExpr_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 |
disambiguate(AmbiguityRemover ar)
Disambiguate the expression. |
void |
dump(CodeWriter w)
Dump the AST node for debugging purposes. |
Term |
entry()
Return the first (sub)term performed when evaluating this term. |
Node |
exceptionCheck(ExceptionChecker ec)
Check exceptions thrown by the expression. |
java.lang.String |
name()
Get the name of the expression. |
AmbExpr |
name(java.lang.String name)
Set the name of the expression. |
Precedence |
precedence()
Get the precedence of the field. |
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Write the expression to an output file. |
java.lang.String |
toString()
|
void |
translate(CodeWriter w,
Translator tr)
Translate the AST using the given CodeWriter . |
Node |
typeCheck(TypeChecker tc)
Type check the expression. |
Methods inherited from class polyglot.ext.jl.ast.Expr_c |
---|
booleanValue, buildTypes, byteValue, charValue, constantValue, doubleValue, floatValue, intValue, isConstant, longValue, printSubExpr, printSubExpr, shortValue, stringValue, type, type |
Methods inherited from class polyglot.ext.jl.ast.Term_c |
---|
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, disambiguateEnter, disambiguateOverride, enterScope, enterScope, exceptionCheckEnter, exceptionCheckOverride, ext, ext, ext, ext, init, node, position, position, print, printBlock, printSubStmt, throwTypes, 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 |
---|
constantValue, isConstant, 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, buildTypes, buildTypesEnter, disambiguateEnter, enterScope, enterScope, exceptionCheckEnter, throwTypes, 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
Constructor Detail |
---|
public AmbExpr_c(Position pos, java.lang.String name)
Method Detail |
---|
public Precedence precedence()
precedence
in interface Expr
precedence
in class Expr_c
public java.lang.String name()
name
in interface AmbExpr
public AmbExpr name(java.lang.String name)
name
in interface AmbExpr
public Node disambiguate(AmbiguityRemover ar) throws SemanticException
disambiguate
in interface NodeOps
disambiguate
in class Node_c
ar
- The visitor which disambiguates.
SemanticException
public Node typeCheck(TypeChecker tc) throws SemanticException
typeCheck
in interface NodeOps
typeCheck
in class Node_c
tc
- The type checking visitor.
SemanticException
public Node exceptionCheck(ExceptionChecker ec) throws SemanticException
exceptionCheck
in interface NodeOps
exceptionCheck
in class Term_c
ec
- The visitor.
SemanticException
public void prettyPrint(CodeWriter w, PrettyPrinter tr)
prettyPrint
in interface NodeOps
prettyPrint
in class Node_c
w
- The code writer to which to write.tr
- The pretty printer. This is not a visitor.public void translate(CodeWriter w, Translator tr)
Node_c
CodeWriter
.
translate
in interface NodeOps
translate
in class Node_c
w
- The code writer to which to write.tr
- The translation pass. This is not a visitor.public java.lang.String toString()
toString
in class Node_c
public Term entry()
entry
in interface Term
entry
in class Term_c
public java.util.List acceptCFG(CFGBuilder v, java.util.List succs)
acceptCFG
in interface Term
acceptCFG
in class Term_c
public void dump(CodeWriter w)
Node
dump
in interface Node
dump
in class Expr_c
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |