Nested Quasis

Douglas Crockford douglas at crockford.com
Thu Feb 2 05:09:07 PST 2012


On 11:59 AM, Waldemar Horwat wrote:
> On 02/01/2012 11:35 AM, Allen Wirfs-Brock wrote:
> Here's one which I couldn't express in a lexer grammar: How to restart
> the quasi after an included expression is over.

If quasis are not nested, then the lexical rule is really simple: Just 
match the `s, and within the literal, match the {}s.

I would prefer to keep it simple, unless there is a compelling 
requirement to provide nesting. If we do the simple version now, we 
could allow the nested case in the future.


More information about the es-discuss mailing list