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