The MATCH_TYPE attribute is used by some of the rules to control how the region matched by the rule will be highlighted.
For example, when using a MARK_PREVIOUS rule to highlight a
function call of the form fcall()
, the following
rule could be used:
<MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>
This would cause fcall
to be highlighted as FUNCTION,
and (
to be highlighted as OPERATOR. In this case, to
maintain bracket matching working, a SEQ rule would have to be added
to match )
and mark it as OPERATOR.
The MATCH_TYPE attribute value can be any of the valid token types, or the following special values:
RULE
: this is the default value.
It tells the syntax system to use the same token type as the TYPE
attribute of the rule.
DEFAULT
: using this value tells the
syntax system to mark the matched region using the default token type
for the current rule set.