Description:
Some Quasi Rewrite rules of the form
{ @ss* } -> { foo(); @ss* }
are problematic because when *ss; matches a directive prologue, the
output will include the prologue in a context where it is likely to be
misinterpreted.
E.g. if @ss* in the above matches "use strict"; bar(), then the output
would be
{ foo(); "use strict"; bar() }
and when rendered and reparsed, the "use strict"; is interpreted as a
string, not a directive prologue.
Please review this at http://codereview.appspot.com/181060
Affected files:
M src/com/google/caja/parser/js/Block.java
M src/com/google/caja/parser/quasiliteral/SimpleQuasiNode.java