summaryrefslogtreecommitdiffstats
path: root/code/Interpreter/Token.java
blob: 0129b78bb48380a86068a422fee0bf3369bfae0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package Interpreter;

public class Token {


    //Stores the token type, the actual text and the runtime object
    public final TokenType type;
    final String text;
    final Object value;


    Token(TokenType type, String text, Object value){
        this.type=type;
        this.text=text;
        this.value=value;

    }

    @Override
    public String toString() {
        return type + " " + text + " " + value;
    }
}