com.adamcornett.cminus.tree
Class GlobalVarDecTree

java.lang.Object
  extended by org.antlr.runtime.tree.BaseTree
      extended by org.antlr.runtime.tree.CommonTree
          extended by com.adamcornett.cminus.tree.CMTree
              extended by com.adamcornett.cminus.tree.GlobalVarDecTree
All Implemented Interfaces:
SymbolNode, TypeNode, org.antlr.runtime.tree.Tree

public class GlobalVarDecTree
extends CMTree
implements SymbolNode


Field Summary
private  Symbol sym
           
 
Fields inherited from class com.adamcornett.cminus.tree.CMTree
log
 
Fields inherited from class org.antlr.runtime.tree.CommonTree
childIndex, parent, startIndex, stopIndex, token
 
Fields inherited from class org.antlr.runtime.tree.BaseTree
children
 
Fields inherited from interface org.antlr.runtime.tree.Tree
INVALID_NODE
 
Constructor Summary
GlobalVarDecTree(org.antlr.runtime.Token t)
           
 
Method Summary
 void emitCode(ClassGenerator classGenerator)
           
 Type getReturnType()
           
 Symbol getSymbol()
           
 void setReturnType(Type t)
           
 void setSymbol(Symbol s)
           
 
Methods inherited from class com.adamcornett.cminus.tree.CMTree
emitLineInfo, getMaxTreeDepth, getNextLabelNumber, getRequiredStack
 
Methods inherited from class org.antlr.runtime.tree.CommonTree
dupNode, getCharPositionInLine, getChildIndex, getLine, getParent, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, isNil, setChildIndex, setParent, setTokenStartIndex, setTokenStopIndex, setUnknownTokenBoundaries, toString
 
Methods inherited from class org.antlr.runtime.tree.BaseTree
addChild, addChildren, createChildrenList, deleteChild, freshenParentAndChildIndexes, freshenParentAndChildIndexes, getAncestor, getAncestors, getChild, getChildCount, getChildren, getFirstChildWithType, hasAncestor, replaceChildren, sanityCheckParentAndChildIndexes, sanityCheckParentAndChildIndexes, setChild, toStringTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sym

private Symbol sym
Constructor Detail

GlobalVarDecTree

public GlobalVarDecTree(org.antlr.runtime.Token t)
Method Detail

emitCode

public void emitCode(ClassGenerator classGenerator)
Overrides:
emitCode in class CMTree

getReturnType

public Type getReturnType()
Specified by:
getReturnType in interface TypeNode

getSymbol

public Symbol getSymbol()
Specified by:
getSymbol in interface SymbolNode

setReturnType

public void setReturnType(Type t)
Specified by:
setReturnType in interface TypeNode

setSymbol

public void setSymbol(Symbol s)
Specified by:
setSymbol in interface SymbolNode