public class CanonicalTypeNode_c extends TypeNode_c implements CanonicalTypeNode
CanonicalTypeNode
is a type node for a canonical type.TypeNode.Instance
type
exceptions, reachable
Constructor and Description |
---|
CanonicalTypeNode_c(Position pos,
Type type) |
CanonicalTypeNode_c(Position pos,
Type type,
Ext ext) |
Modifier and Type | Method and Description |
---|---|
Node |
copy(ExtensionInfo extInfo)
Produce a copy of this node using the given ExtensionInfo.
|
Node |
copy(NodeFactory nf)
Produce a copy of this node using the given NodeFactory.
|
void |
dump(CodeWriter w)
Dump the AST node for debugging purposes.
|
Node |
extRewrite(ExtensionRewriter rw)
Rewrite the AST for the compilation in this language.
|
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Pretty-print the AST using the given
CodeWriter . |
java.lang.String |
toString() |
void |
translate(CodeWriter w,
Translator tr)
Translate the type.
|
Node |
typeCheck(TypeChecker tc)
Type check the type node.
|
acceptCFG, buildTypes, firstChild, isDisambiguated, name, qualifier, type, type, type
exceptionCheck, exceptions, exceptions, exceptions, listChild, reachable, reachable, reachable
addDecls, buildTypesEnter, checkConstants, childExpectedType, copy, copyIfNeeded, del, del, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, error, error, error, exceptionCheckEnter, ext, ext, ext, ext, extRewriteEnter, isTypeChecked, lang, position, position, position, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, throwTypes, typeCheckEnter, typeCheckOverride, visit, visitChild, visitChildren, visitEdge, visitList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
qualifier
del, del, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitList
exceptions, exceptions, reachable, reachable
public Node typeCheck(TypeChecker tc) throws SemanticException
typeCheck
in interface NodeOps
typeCheck
in class Node_c
tc
- The type checking visitor.SemanticException
public Node extRewrite(ExtensionRewriter rw) 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.extRewrite
in interface NodeOps
extRewrite
in class Term_c
rw
- The visitor.SemanticException
public void prettyPrint(CodeWriter w, PrettyPrinter tr)
Node_c
CodeWriter
.prettyPrint
in interface NodeOps
prettyPrint
in class TypeNode_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)
java.lang.Object
).
Otherwise, the string that originally represented the type in the
source file is used.public java.lang.String toString()
toString
in class TypeNode_c
public void dump(CodeWriter w)
Node
public Node copy(NodeFactory nf)
NodeOps
public Node copy(ExtensionInfo extInfo) throws SemanticException
NodeOps
copy
in interface NodeOps
copy
in class Node_c
SemanticException
- If the type information cannot be copied.