I am creating a syntax definition file using YAML. There are several different contexts in which some things are colored differently or in which some things are/are not colored at all, but in most of them, many common matching rules apply (e.g., strings, comments, numbers, etc.). The problem is, every time I define a new context, I have to copy/paste the match: ... scope: ...
logic several times to specify that these common things still apply.
So far I have been able to put the regular expressions for common things (strings, numbers, comments) in variables so I can at least single-source that part of it. But is there a way to just have one section of the file defined for the common match/scope rules and include that in other contexts to single-source the whole thing?