Changed handling of (+=, -=, ++, etc.) operators in
DefaultCajaRewriter and Rule.
Previously, the code in Rule which decomposed a read-assign operator
into temporaries and an assignment assumed that rewriting a
LeftHandSideExpression would produce a LeftHandSideExpression. This
is not true of the valija rewriting rules.
This removes that constraint.
Also,
Added some tests to DefaultCajaRewriterTest.
Removed the POLA demerit in RhinoTestBed. It no longer takes a
filename to dump content to.
Changed postfix ++/-- ops to use unary +x operator instead of x-0
Affected Paths:
M //trunk/src/com/google/caja/caja.js
M //trunk/src/com/google/caja/parser/quasiliteral/DefaultCajaRewriter.java
M //trunk/src/com/google/caja/parser/quasiliteral/Rule.java
M //trunk/tests/com/google/caja/parser/js/JsFunFuzz.java
M
//trunk/tests/com/google/caja/parser/quasiliteral/DefaultCajaRewriterTest.java
M
//trunk/tests/com/google/caja/parser/quasiliteral/InnocentCodeRewriterTest.java
M //trunk/tests/com/google/caja/plugin/CssPropertyPatternsTest.java
M //trunk/tests/com/google/caja/plugin/DomProcessingEventsTest.java
M //trunk/tests/com/google/caja/plugin/HtmlCompiledPluginTest.java
M //trunk/tests/com/google/caja/plugin/stages/DebuggingSymbolsStageTest.java
M //trunk/tests/com/google/caja/util/RhinoTestBed.java
Original issue 680 created by mikesamuel on 2008-08-13T00:26:16.000Z:
gvn review mikesamuel/assign-op-rules
*mikesamuel/assign-op-rules@2154 | mikesamuel | 2008-08-12 16:15:05 -0800 (Tue, 12 Aug 2008)
Description:
Changed handling of (+=, -=, ++, etc.) operators in DefaultCajaRewriter and Rule.
Previously, the code in Rule which decomposed a read-assign operator into temporaries and an assignment assumed that rewriting a LeftHandSideExpression would produce a LeftHandSideExpression. This is not true of the valija rewriting rules.
This removes that constraint.
Also,
Affected Paths: M //trunk/src/com/google/caja/caja.js M //trunk/src/com/google/caja/parser/quasiliteral/DefaultCajaRewriter.java M //trunk/src/com/google/caja/parser/quasiliteral/Rule.java M //trunk/tests/com/google/caja/parser/js/JsFunFuzz.java M //trunk/tests/com/google/caja/parser/quasiliteral/DefaultCajaRewriterTest.java M //trunk/tests/com/google/caja/parser/quasiliteral/InnocentCodeRewriterTest.java M //trunk/tests/com/google/caja/plugin/CssPropertyPatternsTest.java M //trunk/tests/com/google/caja/plugin/DomProcessingEventsTest.java M //trunk/tests/com/google/caja/plugin/HtmlCompiledPluginTest.java M //trunk/tests/com/google/caja/plugin/stages/DebuggingSymbolsStageTest.java M //trunk/tests/com/google/caja/util/RhinoTestBed.java