Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(214)

Issue 159052: Fix rendering of Switch statements (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 6 months ago by MikeSamuel
Modified:
16 years, 6 months ago
Reviewers:
metaweta
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Previously, switch (foo) { case 1: bar(); break; } would render as switch (foo) { case 1: { bar(); break; } } and many switch statements rendered with spurious noops. This fixes that, and makes the switch body getter available on the ancestor class of both default: and case: statements. And made sure that a program consisting of only a directive prologue does not fail to parse. Submitted @3873

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -76 lines) Patch
M src/com/google/caja/parser/js/CaseStmt.java View 3 chunks +7 lines, -11 lines 0 comments Download
M src/com/google/caja/parser/js/DefaultCaseStmt.java View 2 chunks +4 lines, -8 lines 0 comments Download
M src/com/google/caja/parser/js/Parser.java View 2 chunks +29 lines, -41 lines 0 comments Download
M src/com/google/caja/parser/js/SwitchCase.java View 2 chunks +20 lines, -0 lines 0 comments Download
M src/com/google/caja/parser/js/SwitchStmt.java View 1 chunk +0 lines, -4 lines 0 comments Download
M tests/com/google/caja/parser/js/rendergolden1.txt View 2 chunks +5 lines, -12 lines 0 comments Download

Messages

Total messages: 3
MikeSamuel
16 years, 6 months ago (2009-11-21 01:53:03 UTC) #1
MikeSamuel
ping
16 years, 6 months ago (2009-11-30 22:59:27 UTC) #2
metaweta
16 years, 6 months ago (2009-12-01 00:09:06 UTC) #3
LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b