No, I’m talking about having variables in the grammar with reusable regular expression snippets. Something like:On 21 Oct 2018, at 08:54, Allan Odgaard <mailinglist@textmate.org> wrote:On 17 Oct 2018, at 17:36, Jacob Carlborg wrote:
This is exactly according to the specified grammar [3] and it seems to be working as expected. Not sure if the optional group workaround causes some performance implications.
This technique seems like it could be a viable alternative to supporting variables in the TextMate grammar as has been discussed before.Just to be clear, you are talking about variables from the parsed language and highlighting them later in the scope, right?
So something like:
let foo = 42 in … something_with foo …
and here the latter instance offoo
would be marked as a variable?