diff options
Diffstat (limited to 'src/Compiler/Token.java')
-rw-r--r-- | src/Compiler/Token.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Compiler/Token.java b/src/Compiler/Token.java new file mode 100644 index 0000000..4608a3d --- /dev/null +++ b/src/Compiler/Token.java @@ -0,0 +1,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; + } +} |