uk.ac.man.cs.rainbow.compiler.declarations
Class ConstantDeclaration

java.lang.Object
  |
  +--uk.ac.man.cs.rainbow.compiler.CompilerThing
        |
        +--uk.ac.man.cs.rainbow.compiler.CompilerNode
              |
              +--uk.ac.man.cs.rainbow.compiler.declarations.Declaration
                    |
                    +--uk.ac.man.cs.rainbow.compiler.declarations.GlobalDeclaration
                          |
                          +--uk.ac.man.cs.rainbow.compiler.declarations.ConstantDeclaration

public class ConstantDeclaration
extends GlobalDeclaration


Field Summary
 Expression exp
           
 
Fields inherited from class uk.ac.man.cs.rainbow.compiler.declarations.Declaration
nm
 
Fields inherited from class uk.ac.man.cs.rainbow.compiler.CompilerNode
next, sourcepos
 
Constructor Summary
ConstantDeclaration(SourcePosition sourcepos, LocalIdentifier idList, CompilerType given_spec, Expression exp)
           
ConstantDeclaration(SourcePosition sourcepos, String name, CompilerType given_spec, Expression exp)
           
 
Method Summary
 RASMList rasm(CGEnv env)
           
 String toString()
           
 TCEnv typecheck(TCEnv env, Errors errors)
           
 
Methods inherited from class uk.ac.man.cs.rainbow.compiler.declarations.Declaration
return_local
 
Methods inherited from class uk.ac.man.cs.rainbow.compiler.CompilerNode
append, appendNotParent, dumpNode, dumpTree, getParent, indent, iterator, list_typecheck, list_typecheck, listLength, listToString, noParent, rasm_list, rasm, setParent, typecheck, typecheckGreen, typecheckGreen
 
Methods inherited from class uk.ac.man.cs.rainbow.compiler.CompilerThing
className, crashHere, getSerial
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

exp

public Expression exp
Constructor Detail

ConstantDeclaration

public ConstantDeclaration(SourcePosition sourcepos,
                           String name,
                           CompilerType given_spec,
                           Expression exp)

ConstantDeclaration

public ConstantDeclaration(SourcePosition sourcepos,
                           LocalIdentifier idList,
                           CompilerType given_spec,
                           Expression exp)
Method Detail

toString

public String toString()
Overrides:
toString in class GlobalDeclaration

typecheck

public TCEnv typecheck(TCEnv env,
                       Errors errors)
Overrides:
typecheck in class CompilerNode

rasm

public RASMList rasm(CGEnv env)
Overrides:
rasm in class CompilerNode