Change tabbing for everything....
[IRC.git] / Robust / src / IR / Tree / LiteralNode.java
index 9d9a10e569d08a501826a1a45d1d140feed65e3a..9c64184cbe5b671792e233fe48212dfe60a7bff5 100644 (file)
@@ -4,60 +4,60 @@ import IR.TypeUtil;
 
 
 public class LiteralNode extends ExpressionNode {
-    public final static int INTEGER=1;
-    public final static int FLOAT=2;
-    public final static int BOOLEAN=3;
-    public final static int CHAR=4;
-    public final static int STRING=5;
-    public final static int NULL=6;
-
-    Object value;
-    TypeDescriptor type;
-    String typestr;
-
-    public LiteralNode(String type, Object o) {
-       typestr=type;
-       value=o;
-       type=null;
-    }
-
-    public String getTypeString() {
-       return typestr;
-    }
-
-    public TypeDescriptor getType() {
-       return type;
-    }
-
-    public void setType(TypeDescriptor td) {
-       type=td;
-    }
-
-    public Object getValue() {
-       return value;
-    }
-
-    public String printNode(int indent) {
-       if (typestr.equals("null"))
-           return "null";
-       if (typestr.equals("string")) {
-           return '"'+escapeString(value.toString())+'"';
-       }
-       return "/*"+typestr+ "*/"+value.toString();
-    }
-    private static String escapeString(String st) {
-       String new_st="";
-       for(int i=0;i<st.length();i++) {
-           char x=st.charAt(i);
-           if (x=='\n')
-               new_st+="\\n";
-           else if (x=='"')
-               new_st+="'"+'"'+"'";
-           else new_st+=x;
-       }
-       return new_st;
-    }
-    public int kind() {
-       return Kind.LiteralNode;
-    }
+  public final static int INTEGER=1;
+  public final static int FLOAT=2;
+  public final static int BOOLEAN=3;
+  public final static int CHAR=4;
+  public final static int STRING=5;
+  public final static int NULL=6;
+
+  Object value;
+  TypeDescriptor type;
+  String typestr;
+
+  public LiteralNode(String type, Object o) {
+    typestr=type;
+    value=o;
+    type=null;
+  }
+
+  public String getTypeString() {
+    return typestr;
+  }
+
+  public TypeDescriptor getType() {
+    return type;
+  }
+
+  public void setType(TypeDescriptor td) {
+    type=td;
+  }
+
+  public Object getValue() {
+    return value;
+  }
+
+  public String printNode(int indent) {
+    if (typestr.equals("null"))
+      return "null";
+    if (typestr.equals("string")) {
+      return '"'+escapeString(value.toString())+'"';
+    }
+    return "/*"+typestr+ "*/"+value.toString();
+  }
+  private static String escapeString(String st) {
+    String new_st="";
+    for(int i=0; i<st.length(); i++) {
+      char x=st.charAt(i);
+      if (x=='\n')
+       new_st+="\\n";
+      else if (x=='"')
+       new_st+="'"+'"'+"'";
+      else new_st+=x;
+    }
+    return new_st;
+  }
+  public int kind() {
+    return Kind.LiteralNode;
+  }
 }