BenjaminSchaaf / sbnf

A BNF-style language for writing sublime-syntax files
MIT License
58 stars 6 forks source link

Apply scope to the end of existing rules #42

Closed eugenesvk closed 1 year ago

eugenesvk commented 1 year ago

I'd like to append some scope to existing rules to e.g. signify that a given parsed data element is part of a special valid block comment

If I do the following with a special comment-rule, then the scope meta-scope-comment-rule is PREpended, so requires special handling in a color scheme.

comment-rule{meta-scope-comment-rule}   : rule                                      ;
rule{        meta-scope-rule}           : 'terminal-regex'{scope-higher-priority}   ;

Instead I'd like to do append scope to all the elements of a given rule so that that scope beats all the others comment-rule : rule{scope-appended-highest-priority} ;

BenjaminSchaaf commented 1 year ago

Duplicate of #14