Directive prologue members, escapes, and retroactive syntax errors

Brendan Eich brendan at mozilla.org
Fri Oct 15 11:54:19 PDT 2010


On Oct 15, 2010, at 1:10 AM, Peter van der Zee wrote:

> I see your point. I don't know how SpiderMonkey exactly parses it, but it seems as much an edge case as RegularExpressionLiteral vs DivPunctuator. Eg. the parser should tell the lexer what it expects, div or regex.

How much lookahead or token buffering are you thinking of? The problem is the strict mode directive may not be processed by the parser until well after the lexer has tokenized a prior unrecognized directive that contains octal escapes.

/be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es5-discuss/attachments/20101015/3c2a4d86/attachment.html>


More information about the es5-discuss mailing list