I think this may be too hard-coded of a solution. Other devs will want to do something similar for other server-side markup. Also, the mode for php could eventally change to something more specific.

A more generic solution may be this:
* Once you hit `tokenModeName === modeName` case, scan until you return to `tokenModeName === outerMode`
* I am not sure if using `outerMode` will work in all cases, you might need to keep track of `previousMode` (the mode of token before you enter `modeName` mode), and then scan until you return to `previousMode` mode.

What do you think of that solution?