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


#1

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?


#2

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:


#3

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

Pull request: https://github.com/atom/language-javascript/pull/75