// Token Subtype Handlers /////////////////////////////////////////////////////////
+ // FIXME: convert to a string switch
private int getKeyword(String s) throws IOException {
char c;
switch (s.length()) {
}
}
- if (!isInteger) this.number = new Double(dval);
- else if (Byte.MIN_VALUE <= longval && longval <= Byte.MAX_VALUE) this.number = new Byte((byte)longval);
- else if (Short.MIN_VALUE <= longval && longval <= Short.MAX_VALUE) this.number = new Short((short)longval);
- else if (Integer.MIN_VALUE <= longval && longval <= Integer.MAX_VALUE) this.number = new Integer((int)longval);
- else this.number = new Double(longval);
+ if (!isInteger) this.number = JS.N(dval);
+ else this.number = JS.N(longval);
return NUMBER;
}
accumulator.append((char)lastread);
}
public String getString() throws IOException {
- String ret = accumulator.toString();
+ String ret = accumulator.toString().intern();
accumulator = null;
return ret;
}