Skip to content

Commit b366df7

Browse files
committed
add new colors and descriptions from Casey
1 parent 53faed4 commit b366df7

1 file changed

Lines changed: 20 additions & 40 deletions

File tree

app/src/processing/app/syntax/Token.java

Lines changed: 20 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -19,85 +19,65 @@
1919
* @author Slava Pestov
2020
* @version $Id$
2121
*/
22-
public class Token
23-
{
24-
/**
25-
* Normal text token id. This should be used to mark
26-
* normal text.
27-
*/
22+
public class Token {
23+
24+
/** Normal text token id. This should be used to mark normal text. */
2825
public static final byte NULL = 0;
2926

30-
/**
31-
* Comment 1 token id. This can be used to mark a comment.
32-
*/
27+
/** This can be used to mark a comment. */
3328
public static final byte COMMENT1 = 1;
3429

35-
/**
36-
* Comment 2 token id. This can be used to mark a comment.
37-
*/
30+
/** This can be used to mark a comment. */
3831
public static final byte COMMENT2 = 2;
3932

40-
41-
/**
42-
* Literal 1 token id. This can be used to mark a string
43-
* literal (eg, C mode uses this to mark "..." literals)
44-
*/
33+
/** Strings in quotes */
4534
public static final byte LITERAL1 = 3;
46-
47-
/**
48-
* Literal 2 token id. This can be used to mark an object
49-
* literal (eg, Java mode uses this to mark true, false, etc)
50-
*/
35+
36+
/** Constants (QUARTER_PI, CORNERS, etc.) */
5137
public static final byte LITERAL2 = 4;
52-
38+
5339
/**
5440
* Label token id. This can be used to mark labels
5541
* (eg, C mode uses this to mark ...: sequences)
5642
*/
5743
public static final byte LABEL = 5;
5844

59-
/**
60-
* Keyword 1 token id. This can be used to mark a
61-
* keyword. This should be used for general language
62-
* constructs.
63-
*/
45+
/** Datatypes and keywords (void, int, boolean, etc.) */
6446
public static final byte KEYWORD1 = 6;
6547

66-
/**
67-
* Keyword 2 token id. This can be used to mark a
68-
* keyword. This should be used for preprocessor
69-
* commands, or variables.
70-
*/
48+
/** Fields [variables within a class] */
7149
public static final byte KEYWORD2 = 7;
7250

73-
/**
74-
* Keyword 3 token id. This can be used to mark a
75-
* keyword. This should be used for data types.
76-
*/
51+
/** Processing variables (width, height, focused, etc.) */
7752
public static final byte KEYWORD3 = 8;
7853

54+
/** Functions */
7955
public static final byte FUNCTION1 = 9;
8056

57+
/** Methods (functions inside a class) */
8158
public static final byte FUNCTION2 = 10;
8259

60+
/** Loop/function-like blocks (for, while, etc.) */
61+
public static final byte FUNCTION3 = 12;
62+
8363
/**
8464
* Operator token id. This can be used to mark an
8565
* operator. (eg, SQL mode marks +, -, etc with this
8666
* token type)
8767
*/
88-
public static final byte OPERATOR = 11;
68+
public static final byte OPERATOR = 13;
8969

9070
/**
9171
* Invalid token id. This can be used to mark invalid
9272
* or incomplete tokens, so the user can easily spot
9373
* syntax errors.
9474
*/
95-
public static final byte INVALID = 12;
75+
public static final byte INVALID = 14;
9676

9777
/**
9878
* The total number of defined token ids.
9979
*/
100-
public static final byte ID_COUNT = 13;
80+
public static final byte ID_COUNT = 15;
10181

10282
/**
10383
* The first id that can be used for internal state

0 commit comments

Comments
 (0)