> > > Jason suggests keeping the token stream and backing up. Another > alternative is remembering the source position of the start of the > parameter list and reparsing when the ambiguity and strictness is resolved. > Whether text, token, or AST based reprocessing is better is an > implementation decision. >
For the case of strictness, I believe it can also be done without reparsing or AST walking [1]. Interestingly, using this approach it turns out that having the directive as the first statement offers no advantage in parsing whatsoever - it might just as well be at the end! : ) [1]: https://gist.github.com/zenparsing/7753590
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

