Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Issue 10534065: In analyzer, catch use of continue and break in inappropriate places (Closed)

Created:
8 years, 6 months ago by zundel
Modified:
8 years, 6 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

In analyzer, catch use of continue and break in inappropriate places (outside of a loop or in the case of break, with no referenced label) See http://code.google.com/p/dart/issues/detail?id=1658 and http://code.google.com/p/dart/issues/detail?id=2441 Committed: https://code.google.com/p/dart/source/detail?r=8467

Patch Set 1 : # #

Total comments: 15

Patch Set 2 : Refactored a bit, handle break inside function definition #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -53 lines) Patch
M compiler/java/com/google/dart/compiler/parser/DartParser.java View 1 11 chunks +79 lines, -39 lines 0 comments Download
M compiler/java/com/google/dart/compiler/parser/ParserErrorCode.java View 1 1 chunk +2 lines, -0 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/parser/ClassesInterfaces.dart View 1 2 chunks +1 line, -2 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java View 1 1 chunk +20 lines, -0 lines 1 comment Download
M tests/co19/co19-compiler.status View 1 1 chunk +1 line, -11 lines 0 comments Download
M tests/language/language.status View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
zundel
8 years, 6 months ago (2012-06-08 17:47:26 UTC) #1
Brian Wilkerson
https://chromiumcodereview.appspot.com/10534065/diff/2001/compiler/java/com/google/dart/compiler/parser/DartParser.java File compiler/java/com/google/dart/compiler/parser/DartParser.java (right): https://chromiumcodereview.appspot.com/10534065/diff/2001/compiler/java/com/google/dart/compiler/parser/DartParser.java#newcode229 compiler/java/com/google/dart/compiler/parser/DartParser.java:229: private boolean inBreakableStatement = false; Looking at the spec, ...
8 years, 6 months ago (2012-06-08 18:49:05 UTC) #2
zundel
I hope this is clearer. Your suggested test case revealed something I hadn't handled. https://chromiumcodereview.appspot.com/10534065/diff/2001/compiler/java/com/google/dart/compiler/parser/DartParser.java ...
8 years, 6 months ago (2012-06-08 20:15:08 UTC) #3
Brian Wilkerson
LGTM
8 years, 6 months ago (2012-06-08 20:22:52 UTC) #4
scheglov
8 years, 6 months ago (2012-06-09 19:15:53 UTC) #5
LGTM

https://chromiumcodereview.appspot.com/10534065/diff/8002/compiler/javatests/...
File compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java (right):

https://chromiumcodereview.appspot.com/10534065/diff/8002/compiler/javatests/...
compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java:536:
parseUnit("phony_lone_super_expression1.dart",
super expression?

Powered by Google App Engine
This is Rietveld 408576698