polyglot.ext.coffer.ast
Class KeyNode_c

java.lang.Object
  extended bypolyglot.ext.jl.ast.Node_c
      extended bypolyglot.ext.coffer.ast.KeyNode_c
All Implemented Interfaces:
java.lang.Cloneable, Copy, JL, KeyNode, Node, NodeOps

public class KeyNode_c
extends Node_c
implements KeyNode

An AST node for a Key. The key may be ambiguous.


Field Summary
protected  Key key
           
 
Fields inherited from class polyglot.ext.jl.ast.Node_c
del, ext, position
 
Constructor Summary
KeyNode_c(Position pos, Key key)
           
 
Method Summary
 void addDecls(Context c)
          Add any declarations to the context that should be in scope when visiting later sibling nodes.
 Node disambiguate(AmbiguityRemover sc)
          Remove any remaining ambiguities from the AST.
 Key key()
           
 KeyNode key(Key key)
           
 java.lang.String name()
           
 void prettyPrint(CodeWriter w, PrettyPrinter tr)
          Pretty-print the AST using the given code writer.
 java.lang.String toString()
           
 void translate(CodeWriter w, Translator tr)
          Translate the AST using the given code writer.
 
Methods inherited from class polyglot.ext.jl.ast.Node_c
addMembers, addMembersEnter, addMembersOverride, buildTypes, buildTypesEnter, buildTypesOverride, childExpectedType, copy, del, del, disambiguateEnter, disambiguateOverride, dump, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, exceptionCheckOverride, ext, ext, ext, ext, init, node, position, position, print, printBlock, printSubStmt, throwTypes, typeCheck, typeCheckEnter, typeCheckOverride, visit, visitChild, visitChildren, 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, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge
 
Methods inherited from interface polyglot.ast.JL
init, node
 
Methods inherited from interface polyglot.ast.NodeOps
addMembers, addMembersEnter, buildTypes, buildTypesEnter, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, throwTypes, typeCheck, typeCheckEnter, visitChildren
 
Methods inherited from interface polyglot.util.Copy
copy
 

Field Detail

key

protected Key key
Constructor Detail

KeyNode_c

public KeyNode_c(Position pos,
                 Key key)
Method Detail

name

public java.lang.String name()
Specified by:
name in interface KeyNode

key

public Key key()
Specified by:
key in interface KeyNode

key

public KeyNode key(Key key)
Specified by:
key in interface KeyNode

disambiguate

public Node disambiguate(AmbiguityRemover sc)
                  throws SemanticException
Description copied from interface: NodeOps
Remove any remaining ambiguities from the AST. This method is called by the 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.

Specified by:
disambiguate in interface NodeOps
Overrides:
disambiguate in class Node_c
Throws:
SemanticException

addDecls

public void addDecls(Context c)
Description copied from interface: NodeOps
Add any declarations to the context that should be in scope when visiting later sibling nodes.

Specified by:
addDecls in interface NodeOps
Overrides:
addDecls in class Node_c

prettyPrint

public void prettyPrint(CodeWriter w,
                        PrettyPrinter tr)
Description copied from interface: NodeOps
Pretty-print the AST using the given code writer.

Specified by:
prettyPrint in interface NodeOps
Overrides:
prettyPrint in class Node_c

translate

public void translate(CodeWriter w,
                      Translator tr)
Description copied from interface: NodeOps
Translate the AST using the given code writer.

Specified by:
translate in interface NodeOps
Overrides:
translate in class Node_c

toString

public java.lang.String toString()
Overrides:
toString in class Node_c