blob: 50d3804adc3663eaa173036c516664279d7adfea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package Compiler;
public class Token {
//Stores the token type, the actual text and the runtime object
public final TokenType type;
final String text;
final Object value;
final int line;
Token(TokenType type, String text, Object value,int line){
this.type=type;
this.text=text;
this.value=value;
this.line=line;
}
@Override
public String toString() {
return type + " " + text + " " + value;
}
}
|