syntax
syntax copied to clipboard
Tokenizer: Pass matched RegExp groups as variables
Currently there is no way to refer a specific matched group in the lex rule handler. We need to support them as variables: $1, $2, etc. Example:
[`\\n( *)`, `yytext = $1; return 'INDENT'`]