public interface TokenTypes
If you're creating your own TokenMaker for a new language, it's
important to note that while most of these token types are used purely
for styling information, that TokenTypes.SEPARATOR is given special
treatment in this library. Specifically, many utility methods assume that
tokens such as curly braces and square brackets are identified as type
SEPARATOR. For example,
RSyntaxTextArea.setPaintMatchedBracketPair makes this assumption.
Note that all valid token types are >= 0, so extensions of the TokenMaker class are free to internally use all ints < 0 ONLY for "end-of-line" style markers; they are ignored by painting implementations.
| Modifier and Type | Field and Description |
|---|---|
static int |
ANNOTATION |
static int |
COMMENT_DOCUMENTATION |
static int |
COMMENT_EOL |
static int |
COMMENT_KEYWORD |
static int |
COMMENT_MARKUP |
static int |
COMMENT_MULTILINE |
static int |
DATA_TYPE |
static int |
DEFAULT_NUM_TOKEN_TYPES |
static int |
ERROR_CHAR |
static int |
ERROR_IDENTIFIER |
static int |
ERROR_NUMBER_FORMAT |
static int |
ERROR_STRING_DOUBLE |
static int |
FUNCTION |
static int |
IDENTIFIER |
static int |
LITERAL_BACKQUOTE |
static int |
LITERAL_BOOLEAN |
static int |
LITERAL_CHAR |
static int |
LITERAL_NUMBER_DECIMAL_INT |
static int |
LITERAL_NUMBER_FLOAT |
static int |
LITERAL_NUMBER_HEXADECIMAL |
static int |
LITERAL_STRING_DOUBLE_QUOTE |
static int |
MARKUP_CDATA |
static int |
MARKUP_CDATA_DELIMITER |
static int |
MARKUP_COMMENT |
static int |
MARKUP_DTD |
static int |
MARKUP_ENTITY_REFERENCE |
static int |
MARKUP_PROCESSING_INSTRUCTION |
static int |
MARKUP_TAG_ATTRIBUTE |
static int |
MARKUP_TAG_ATTRIBUTE_VALUE |
static int |
MARKUP_TAG_DELIMITER |
static int |
MARKUP_TAG_NAME |
static int |
NULL
Tokens of type
NULL mark the end of lines with no
multi-line token at the end being continued to the next line,
for example, being in the middle of a block comment in Java. |
static int |
OPERATOR |
static int |
PREPROCESSOR |
static int |
REGEX |
static int |
RESERVED_WORD |
static int |
RESERVED_WORD_2 |
static int |
SEPARATOR
Separators are typically single-character tokens such as parens
brackets and braces (
[, ], {,
}, etc.). |
static int |
VARIABLE |
static int |
WHITESPACE |
static final int NULL
NULL mark the end of lines with no
multi-line token at the end being continued to the next line,
for example, being in the middle of a block comment in Java.static final int COMMENT_EOL
static final int COMMENT_MULTILINE
static final int COMMENT_DOCUMENTATION
static final int COMMENT_KEYWORD
static final int COMMENT_MARKUP
static final int RESERVED_WORD
static final int RESERVED_WORD_2
static final int FUNCTION
static final int LITERAL_BOOLEAN
static final int LITERAL_NUMBER_DECIMAL_INT
static final int LITERAL_NUMBER_FLOAT
static final int LITERAL_NUMBER_HEXADECIMAL
static final int LITERAL_STRING_DOUBLE_QUOTE
static final int LITERAL_CHAR
static final int LITERAL_BACKQUOTE
static final int DATA_TYPE
static final int VARIABLE
static final int REGEX
static final int ANNOTATION
static final int IDENTIFIER
static final int WHITESPACE
static final int SEPARATOR
[, ], {,
}, etc.). In particular, brackets and braces
must be of this token type for bracket matching to work.static final int OPERATOR
static final int PREPROCESSOR
static final int MARKUP_TAG_DELIMITER
static final int MARKUP_TAG_NAME
static final int MARKUP_TAG_ATTRIBUTE
static final int MARKUP_TAG_ATTRIBUTE_VALUE
static final int MARKUP_COMMENT
static final int MARKUP_DTD
static final int MARKUP_PROCESSING_INSTRUCTION
static final int MARKUP_CDATA_DELIMITER
static final int MARKUP_CDATA
static final int MARKUP_ENTITY_REFERENCE
static final int ERROR_IDENTIFIER
static final int ERROR_NUMBER_FORMAT
static final int ERROR_STRING_DOUBLE
static final int ERROR_CHAR
static final int DEFAULT_NUM_TOKEN_TYPES