How to extend the list of regular expression flags in grammar files?


Atom language packages often includes regular expression grammars, such as…

ES6 adds two new regex flags: y and u. I’d like to add these to the list of recognized regex flags, to avoid this situation:

…but I can’t find where this is done – the recognized regex flags don’t seem to be part of this grammar file.

What am I missing?


The regular-expressions cson is included in the more general javascript grammar, and it contains only the rules for inner regular expressions content. The expressions delimiters are defined in the main file:


Ah, thanks! I had searched for flags and gim (sorted alphabetically) but not igm.

Pull request: