On 7 Apr 2016, at 3:14, Jacob Carlborg wrote:
It would be really nice if the TextMate grammar syntax allowed, somehow, to define rules, or parts of a rule, which the other rules can be composed of, similar to above.
Just to be sure I understand, you would like to define somewhere in the grammar how e.g. an identifier looks (regex) and then in other patterns, say a function prototype, be able to insert this definition (in the full regex for the function prototype)?
If so, have a look at this proposal: https://github.com/textmate/textmate/pull/1276#issuecomment-63450941 and let me know if that fits your needs.