arnaud-lb/Twig — comment on commit a2036868a509b77211c288694edfe17b72833f25
File: lib/Twig/Lexer.php line 44
By nikic:

Also it might be reasonable to match non-interpolating double quoted strings just like normal strings. I.e. use `REGEX_STRING = '/"([^#"\\\\]*(?:\\\\.[^#"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As';` and match that case before the double quoted case.

That way the more complex token structure will only be created when interpolation is used. This is how PHP does it by the way.