summaryrefslogtreecommitdiffstats
path: root/src/Compiler/Token.java
blob: 4608a3de3ea5cc0451fb59ea6b6f29d0503e19be (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 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;


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

    }

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