Posted 20 years ago
by Campion
Is there a way to change a token's HighlightingStyle ForeColor during semantic parsing (PostParse method)?
The goal is to distinguish between user-defined functions and system functions by color. The regex I'm using for the token is:The LookAhead, basically, just matches on "(".
If I can't change the color during semantic parsing another approach I'm considering is loading the system functions (static list of about 200) at run-time. Then I'd have one token and style for user-defined functions (listed first in the language definition file) and a second token (using the same regex) and style for system functions.
Any alternative design others would like to offer if semantic parsing doesn't suffice?
The goal is to distinguish between user-defined functions and system functions by color. The regex I'm using for the token is:
<RegexPatternGroup Token="FunctionToken" Style="FunctionStyle" PatternValue="(_ | {AlphaMacro})({WordMacro})*" LookAhead="{FunctionMacro}"/>
If I can't change the color during semantic parsing another approach I'm considering is loading the system functions (static list of about 200) at run-time. Then I'd have one token and style for user-defined functions (listed first in the language definition file) and a second token (using the same regex) and style for system functions.
Any alternative design others would like to offer if semantic parsing doesn't suffice?