The MARK_PREVIOUS
rule, which must be placed
inside a RULES
tag, highlights from the end of the
previous syntax token to the matched text. The text to match is
specified between opening and closing MARK_PREVIOUS
tags. The following attributes are supported:
TYPE
- The token type to highlight the
text with. See the section called “Token Types” for a list
of token types.
AT_LINE_START
- If set to
TRUE
, the sequence will only be highlighted
if it occurs at the beginning of a line.
AT_WHITESPACE_END
- If set to
TRUE
, the sequence will only be highlighted
if it is the first non-whitespace text in the line.
AT_WORD_START
- If set to
TRUE
, the sequence will only be highlighted
if it occurs at the beginning of a word.
MATCH_TYPE
- Controls how the matched
region will be highlighted. See the section called “The MATCH_TYPE Attribute” for more information.
Here is a rule that highlights labels in Java mode (for example, “XXX:”):
<MARK_PREVIOUS AT_WHITESPACE_END="TRUE" MATCH_TYPE="DEFAULT">:</MARK_PREVIOUS>