quasiliteral strawman updates

Mike Samuel mikesamuel at gmail.com
Thu May 26 02:18:25 PDT 2011

I updated the quasis strawman (
http://wiki.ecmascript.org/doku.php?id=strawman:quasis ) to include
the suggested changes to escape sequence handling, and the
SubstitutionBody definition based on identifier chains:

There was a very rough desugaring suggested to make raw literal
portions available to quasi handlers that want it while providing easy
standard escape expansion by default.  I didn't use that particular
desugaring.  Instead, I synthesized it with a desugaring that I hadn't
mentioned in meeting earlier which kills 3 birds with one stone: raw
literal portions are available at per quasi-use cost, literal portions
with escape sequences expanded are available by default, and there is
an object available that can easily serve as a key into a weak map
used to memoize state derived from the literal portions.
See http://wiki.ecmascript.org/doku.php?id=strawman:quasis#desugaring

Finally, a number of people were confused by the tokenizing argument (
http://wiki.ecmascript.org/doku.php?id=strawman:quasis#tokenizing ).
This is moot with the simpler substitution body in place, but I
implemented that scheme in literate JavaScript and you can play around
with an interactive demo :

More information about the es-discuss mailing list