comp
Class StringValNode

java.lang.Object
  |
  +--comp.Node
        |
        +--comp.ExprNode
              |
              +--comp.StringValNode

class StringValNode
extends ExprNode

String literal expression node.


Field Summary
(package private)  java.lang.String label
           
(package private)  java.lang.String val
           
 
Fields inherited from class comp.Node
asm, globalScope, labelCount, strings
 
Constructor Summary
StringValNode(java.lang.String l, java.lang.String s)
           
 
Method Summary
 void asHTML(java.io.PrintStream out)
          Process this node.
 java.lang.String codeGen(Scope scope, RegBank bank)
          A little tricky: Load the address of myself from the string table.
 Type getType(Scope s)
           
 java.lang.String toString()
           
 
Methods inherited from class comp.Node
addDefs, addString, getLabel, lvalue, reset, rvalue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

label

java.lang.String label

val

java.lang.String val
Constructor Detail

StringValNode

public StringValNode(java.lang.String l,
                     java.lang.String s)
Method Detail

toString

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

codeGen

public java.lang.String codeGen(Scope scope,
                                RegBank bank)
A little tricky: Load the address of myself from the string table.

Specified by:
codeGen in class Node

asHTML

public void asHTML(java.io.PrintStream out)
Process this node.

Specified by:
asHTML in class Node

getType

public Type getType(Scope s)