From 0c54d7f8cb4b17d80ed21f7a9916ad27a13e34ed Mon Sep 17 00:00:00 2001 From: AidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com> Date: Sat, 6 Nov 2021 01:44:14 +0000 Subject: Re-arranged files and added C compilation --- src/Compiler/Token.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/Compiler/Token.java (limited to 'src/Compiler/Token.java') 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; + } +} -- cgit v1.2.3