Refutable pattern
Brendan Eich
brendan at mozilla.com
Fri Feb 1 12:45:06 PST 2013
Brendan Eich wrote:
> One solution already used in ECMA-262 to regain LR(1) parsing of the
> standard grammar is lookahead restriction. Observe that with
> postfix-'?' in patterns, the legal lookahead set is {'=', ':' , ',',
> '}', ']'}. So we could simply write a lookahead restriction.
Amended per the formal parameter case that Claude Pache provoked me to
consider:
lookahead not in {'=', ':' , ',', '}', ']', ')'}
after the postfix-'?' optionally following an object or array literal in
the main (cover) grammar.
/be
More information about the es-discuss
mailing list