|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpolyglot.ast.Node_c
polyglot.ast.AmbPrefix_c
public class AmbPrefix_c
An AmbPrefix
is an ambiguous AST node composed of dot-separated
list of identifiers that must resolve to a prefix.
Field Summary | |
---|---|
protected Id |
name
|
protected Prefix |
prefix
|
Fields inherited from class polyglot.ast.Node_c |
---|
del, error, ext, position |
Constructor Summary | |
---|---|
AmbPrefix_c(Position pos,
Prefix prefix,
Id name)
|
Method Summary | |
---|---|
Node |
copy(NodeFactory nf)
Produce a copy of this node using the given NodeFactory. |
Node |
disambiguate(AmbiguityRemover ar)
Disambiguate the prefix. |
Node |
exceptionCheck(ExceptionChecker ec)
Check exceptions thrown by the prefix. |
AmbPrefix |
id(Id name)
Set the name of the prefix. |
java.lang.String |
name()
Get the name of the prefix. |
AmbPrefix |
name(java.lang.String name)
Set the name of the prefix. |
Id |
nameNode()
Get the name of the prefix. |
Prefix |
prefix()
Get the prefix of the prefix. |
AmbPrefix |
prefix(Prefix prefix)
Set the prefix of the prefix. |
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Write the prefix to an output file. |
protected AmbPrefix_c |
reconstruct(Prefix prefix,
Id name)
Reconstruct the prefix. |
java.lang.String |
toString()
|
Node |
typeCheck(TypeChecker tc)
Type check the AST. |
Node |
visitChildren(NodeVisitor v)
Visit the children of the prefix. |
Methods inherited from class polyglot.ast.Node_c |
---|
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, del, del, disambiguateEnter, disambiguateOverride, dump, dump, dump, enterChildScope, enterScope, error, error, exceptionCheckEnter, ext, ext, ext, ext, init, isDisambiguated, isTypeChecked, node, position, position, prettyPrint, prettyPrint, 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.Node |
---|
childExpectedType, del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitChild, visitEdge, visitList |
Methods inherited from interface polyglot.ast.JL |
---|
init, node |
Methods inherited from interface polyglot.ast.NodeOps |
---|
addDecls, buildTypes, buildTypesEnter, checkConstants, copy, disambiguateEnter, disambiguateOverride, dump, dump, enterChildScope, enterScope, exceptionCheckEnter, prettyPrint, prettyPrint, throwTypes, translate, typeCheckEnter, typeCheckOverride |
Methods inherited from interface polyglot.ast.Node |
---|
childExpectedType, del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitChild, visitEdge, visitList |
Methods inherited from interface polyglot.ast.JL |
---|
init, node |
Methods inherited from interface polyglot.ast.NodeOps |
---|
addDecls, buildTypes, buildTypesEnter, checkConstants, copy, disambiguateEnter, disambiguateOverride, dump, dump, enterChildScope, enterScope, exceptionCheckEnter, prettyPrint, prettyPrint, throwTypes, translate, typeCheckEnter, typeCheckOverride |
Field Detail |
---|
protected Prefix prefix
protected Id name
Constructor Detail |
---|
public AmbPrefix_c(Position pos, Prefix prefix, Id name)
Method Detail |
---|
public Id nameNode()
nameNode
in interface AmbPrefix
public AmbPrefix id(Id name)
public java.lang.String name()
name
in interface AmbPrefix
public AmbPrefix name(java.lang.String name)
public Prefix prefix()
prefix
in interface AmbPrefix
public AmbPrefix prefix(Prefix prefix)
protected AmbPrefix_c reconstruct(Prefix prefix, Id name)
public Node visitChildren(NodeVisitor v)
visitChildren
in interface NodeOps
visitChildren
in class Node_c
v
- The visitor that will traverse/rewrite the AST.
this
.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
NodeOps
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.
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 Node_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 java.lang.String toString()
toString
in class Node_c
public Node copy(NodeFactory nf)
NodeOps
copy
in interface NodeOps
copy
in class Node_c
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |