public class Id_c extends Node_c implements Id
Id
represents a simple identifier in the AST. Because it is a
full-fledged node, extensions have the opportunity to attach additional
information.Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
id |
Constructor and Description |
---|
Id_c(Position pos,
java.lang.String id) |
Id_c(Position pos,
java.lang.String id,
Ext ext) |
Modifier and Type | Method and Description |
---|---|
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.
|
void |
equals(java.lang.String s) |
java.lang.String |
id()
Get the name of the identifier.
|
protected <N extends Id_c> |
id(N n,
java.lang.String id) |
Id |
id(java.lang.String id)
Set the name of the identifier.
|
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Pretty-print the AST using the given
CodeWriter . |
java.lang.String |
toString() |
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, copyIfNeeded, del, del, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, error, error, error, exceptionCheck, exceptionCheckEnter, ext, ext, ext, ext, extRewrite, extRewriteEnter, isDisambiguated, isTypeChecked, lang, position, position, position, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visit, visitChild, visitChildren, visitEdge, visitList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
del, del, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitList
public Id_c(Position pos, java.lang.String id)
public final void equals(java.lang.String s)
public java.lang.String id()
Id
public Id id(java.lang.String id)
Id
protected <N extends Id_c> N id(N n, java.lang.String id)
public void prettyPrint(CodeWriter w, PrettyPrinter tr)
Node_c
CodeWriter
.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 dump(CodeWriter w)
Node