Macros |
Top Previous Next |
Scripts > Token definitions > Regular expressions > Macros
The names of already defined token can be used for the definition of other token. To do this, the name must be included into the braces '{' and '}'. Now this expression can be situated inside of a new token definition. When parsing the new definition, the TextTransformer will remove the braces and substitute the token name by its text.
Example:
SPACES = [ \t]*
DECLARATOR = (((\w+::)*\w+)::)?(\w+) \ //Scope(s) and name {SPACES} \ // optional spaces \([^)]*\) // Parameter
Internally the TextTransformer will collapse the line to one:
(\w+::)?(\w+)::(\w+)[ \t]*\([^)]*\)
|
This page belongs to the TextTransformer Documentation |
Home Content German |