public class ElementValuePair_c extends Term_c implements ElementValuePair
Term.Instance
Modifier and Type | Field and Description |
---|---|
protected Id |
name |
protected Term |
value |
exceptions, reachable
Constructor and Description |
---|
ElementValuePair_c(Position pos,
Id name,
Term value) |
Modifier and Type | Method and Description |
---|---|
<T> java.util.List<T> |
acceptCFG(CFGBuilder<?> v,
java.util.List<T> succs)
Visit this term in evaluation order, calling v.edge() for each successor
in succs, if data flows on that edge.
|
Term |
firstChild()
Return the first direct subterm performed when evaluating this term.
|
Id |
id() |
ElementValuePair |
id(Id name) |
protected <N extends ElementValuePair_c> |
id(N n,
Id name) |
java.lang.String |
name() |
void |
prettyPrint(CodeWriter w,
PrettyPrinter pp)
Pretty-print the AST using the given
CodeWriter . |
java.lang.String |
toString() |
void |
translate(CodeWriter w,
Translator tr)
Translate the AST using the given
CodeWriter . |
Node |
typeCheck(TypeChecker tc)
Type check the AST.
|
Term |
value() |
protected <N extends ElementValuePair_c> |
value(N n,
Term value) |
ElementValuePair |
value(Term value) |
Node |
visitChildren(NodeVisitor v)
Visit the children of the node.
|
exceptionCheck, exceptions, exceptions, exceptions, extRewrite, listChild, reachable, reachable, reachable
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, copy, copyIfNeeded, del, del, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, dump, enterChildScope, enterScope, error, error, error, exceptionCheckEnter, ext, ext, ext, ext, extRewriteEnter, isDisambiguated, isTypeChecked, lang, position, position, position, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, throwTypes, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
exceptions, exceptions, reachable, reachable
del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, typeCheckEnter, typeCheckOverride, visitChild, visitList
public java.lang.String name()
name
in interface ElementValuePair
public Id id()
id
in interface ElementValuePair
public ElementValuePair id(Id name)
protected <N extends ElementValuePair_c> N id(N n, Id name)
public Term value()
value
in interface ElementValuePair
public ElementValuePair value(Term value)
protected <N extends ElementValuePair_c> N value(N n, Term value)
public Node visitChildren(NodeVisitor v)
NodeOps
visitChildren
in interface NodeOps
visitChildren
in class Node_c
v
- The visitor that will traverse/rewrite the AST.this
.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 void prettyPrint(CodeWriter w, PrettyPrinter pp)
Node_c
CodeWriter
.prettyPrint
in interface NodeOps
prettyPrint
in class Node_c
w
- The code writer to which to write.pp
- The pretty printer. This is not a visitor.public void translate(CodeWriter w, Translator tr)
NodeOps
CodeWriter
.public <T> java.util.List<T> acceptCFG(CFGBuilder<?> v, java.util.List<T> succs)
TermOps
public Term firstChild()
TermOps
firstChild
in interface TermOps
firstChild
in class Term_c