diff options
author | AidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com> | 2021-12-05 03:27:18 +0000 |
---|---|---|
committer | AidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com> | 2021-12-05 03:27:18 +0000 |
commit | 9e6c89f1fa93287104381e02f0bbbdd6060a9382 (patch) | |
tree | 65a26fbbccb0172805b131b7100ffcabb7790da3 /src/Compiler/Token.java | |
parent | 43909b350b9084ed33f121a15c5770224cbdc79f (diff) | |
download | esotericFORTRAN-9e6c89f1fa93287104381e02f0bbbdd6060a9382.tar.gz esotericFORTRAN-9e6c89f1fa93287104381e02f0bbbdd6060a9382.zip |
Added subroutines and comments for most files
Diffstat (limited to 'src/Compiler/Token.java')
-rw-r--r-- | src/Compiler/Token.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Compiler/Token.java b/src/Compiler/Token.java index 50d3804..b6f11a8 100644 --- a/src/Compiler/Token.java +++ b/src/Compiler/Token.java @@ -1,15 +1,23 @@ package Compiler; +/** + * Class for storing information about a single token + */ 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; + /** + * Contructor for a token object + * @param type the type of token + * @param text the actual text for the token + * @param value the value the token represents + * @param line the line of code the token is on + */ Token(TokenType type, String text, Object value,int line){ this.type=type; this.text=text; @@ -17,10 +25,4 @@ public class Token { this.line=line; } - - @Override - public String toString() { - return type + " " + text + " " + value; - } - } |