|
|||||||||
| 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 AmbPrefixpublic AmbPrefix id(Id name)
public java.lang.String name()
name in interface AmbPrefixpublic AmbPrefix name(java.lang.String name)
public Prefix prefix()
prefix in interface AmbPrefixpublic AmbPrefix prefix(Prefix prefix)
protected AmbPrefix_c reconstruct(Prefix prefix,
Id name)
public Node visitChildren(NodeVisitor v)
visitChildren in interface NodeOpsvisitChildren in class Node_cv - The visitor that will traverse/rewrite the AST.
this.
public Node disambiguate(AmbiguityRemover ar)
throws SemanticException
disambiguate in interface NodeOpsdisambiguate in class Node_car - The visitor which disambiguates.
SemanticException
public Node typeCheck(TypeChecker tc)
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.
typeCheck in interface NodeOpstypeCheck in class Node_ctc - The type checking visitor.
SemanticException
public Node exceptionCheck(ExceptionChecker ec)
throws SemanticException
exceptionCheck in interface NodeOpsexceptionCheck in class Node_cec - The visitor.
SemanticException
public void prettyPrint(CodeWriter w,
PrettyPrinter tr)
prettyPrint in interface NodeOpsprettyPrint in class Node_cw - 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_cpublic Node copy(NodeFactory nf)
NodeOps
copy in interface NodeOpscopy in class Node_c
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||