blob: b6f11a8f06dbfa83d09dd9edfda44f2795acae70 (
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
27
28
|
package Compiler;
/**
* Class for storing information about a single token
*/
public class Token {
public final TokenType type;
final String text;
final Object value;
final int line;
/**
* Contructor for a token object
* @param type the type of token
* @param text the actual text for the token
* @param value the value the token represents
* @param line the line of code the token is on
*/
Token(TokenType type, String text, Object value,int line){
this.type=type;
this.text=text;
this.value=value;
this.line=line;
}
}
|