change
[IRC.git] / Robust / src / Lex / CharacterLiteral.java
1 package Lex;
2
3 import java_cup.runtime.Symbol;
4 import Parse.Sym;
5
6 class CharacterLiteral extends Literal {
7   Character val;
8   CharacterLiteral(char c) {
9     this.val = new Character(c);
10   }
11
12   Symbol token() {
13     return new Symbol(Sym.CHARACTER_LITERAL, val);
14   }
15
16   public String toString() {
17     return "CharacterLiteral <"+Token.escape(val.toString())+">";
18   }
19 }