-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTokenType.java
More file actions
20 lines (20 loc) · 896 Bytes
/
TokenType.java
File metadata and controls
20 lines (20 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public enum TokenType {
IDENTIFIER, // variables, other names that usually appear black in editors.
KEYWORD, // 'class', etc. also includes data types (i.e., double)
NUMBER, STRING,
SPACE, NEWLINE, TAB,
IMPORTNAME, // the name after 'import' (i.e., java.util.Scanner)
HEADDATATYPE, // the function name after an identifier or class name
CONSTANT, // an identifier that is in uppercase (and may contain '_')
OTHERPUNCTUATION,
// i.e., ';', '()', '{}', '<>', '[]', ',', '*', '='
// '+', '-', '/', '%', '!', '~', '&', '|'
// '?', ':', '^', '.', '''
JAVADOC, // javadoc comments (highlighted in orange by default)
ANNOTATION, // annotations (i.e., @Override)
METHODNAME, // i.e., add() {} ('add')
COMMENT, // i.e., '//' or '/**/'
CLASSNAME, // i.e., class Head {} ('Head')
DATATYPE, // i.e., Short, Double, String
LITERAL // i.e., null, true, false
}