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

Issue 9158001: Better error recovery. (Closed)

Created:
8 years, 11 months ago by ahe
Modified:
8 years, 11 months ago
Reviewers:
ngeoffray
CC:
reviews_dartlang.org, Lasse Reichstein Nielsen, kasperl, floitsch, karlklose
Visibility:
Public.

Description

Better error recovery. Committed: https://code.google.com/p/dart/source/detail?r=3130

Patch Set 1 : changes #

Patch Set 2 : Count errors correctly #

Patch Set 3 : Filter out incorrect dart files and fix error in MyListener #

Patch Set 4 : Fix typo and update test status #

Total comments: 4

Patch Set 5 : Include SyntaxTest.dart #

Total comments: 6

Patch Set 6 : Update test status with bug numbers and remove a redundant test #

Patch Set 7 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+289 lines, -33 lines) Patch
M dart/frog/leg/scanner/listener.dart View 1 2 3 5 chunks +7 lines, -20 lines 0 comments Download
M dart/frog/leg/scanner/parser.dart View 1 2 3 4 5 7 chunks +21 lines, -6 lines 0 comments Download
M dart/frog/leg/tools/find_file_to_parse.sh View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M dart/frog/leg/tools/mini_parser.dart View 1 2 5 chunks +5 lines, -5 lines 0 comments Download
M dart/tests/language/language.status View 1 2 3 4 5 6 2 chunks +12 lines, -0 lines 0 comments Download
M dart/tests/language/language-leg.status View 1 2 3 3 chunks +1 line, -2 lines 0 comments Download
A dart/tests/language/src/SyntaxTest.dart View 1 2 3 4 5 1 chunk +236 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
ahe
8 years, 11 months ago (2012-01-09 18:15:10 UTC) #1
ngeoffray
LGTM, but did you forget to upload SyntaxTest? http://codereview.chromium.org/9158001/diff/2004/dart/frog/leg/scanner/parser.dart File dart/frog/leg/scanner/parser.dart (right): http://codereview.chromium.org/9158001/diff/2004/dart/frog/leg/scanner/parser.dart#newcode371 dart/frog/leg/scanner/parser.dart:371: // ...
8 years, 11 months ago (2012-01-10 07:49:45 UTC) #2
ahe
Thank you, Nicolas. Uploaded SyntaxTest.dart. PTAL. Cheers, Peter http://codereview.chromium.org/9158001/diff/2004/dart/frog/leg/scanner/parser.dart File dart/frog/leg/scanner/parser.dart (right): http://codereview.chromium.org/9158001/diff/2004/dart/frog/leg/scanner/parser.dart#newcode371 dart/frog/leg/scanner/parser.dart:371: // ...
8 years, 11 months ago (2012-01-10 08:02:28 UTC) #3
ahe
I noticed a few things I should clean up before submitting. http://codereview.chromium.org/9158001/diff/11001/dart/tests/language/src/SyntaxTest.dart File dart/tests/language/src/SyntaxTest.dart (right): ...
8 years, 11 months ago (2012-01-10 08:05:55 UTC) #4
ngeoffray
Still LGTM http://codereview.chromium.org/9158001/diff/2004/dart/frog/leg/scanner/parser.dart File dart/frog/leg/scanner/parser.dart (right): http://codereview.chromium.org/9158001/diff/2004/dart/frog/leg/scanner/parser.dart#newcode371 dart/frog/leg/scanner/parser.dart:371: // listener more explicitly that it must ...
8 years, 11 months ago (2012-01-10 08:07:09 UTC) #5
ahe
8 years, 11 months ago (2012-01-10 08:32:33 UTC) #6
Thank you

http://codereview.chromium.org/9158001/diff/2004/dart/frog/leg/scanner/parser...
File dart/frog/leg/scanner/parser.dart (right):

http://codereview.chromium.org/9158001/diff/2004/dart/frog/leg/scanner/parser...
dart/frog/leg/scanner/parser.dart:371: // listener more explicitly that it must
pop an identifier.
On 2012/01/10 08:07:09, ngeoffray wrote:
> On 2012/01/10 08:02:28, ahe wrote:
> > On 2012/01/10 07:49:45, ngeoffray wrote:
> > > Is that still a hack?
> > 
> > Yes. Something is wrong here, but we don't know what the user intended.
> Calling
> > endTopLevelFields keeps the node stack in the listener well balanced, but we
> > should explicitly tell the listener that this isn't a field.
> 
> So should you do the same line 555?

Done.

http://codereview.chromium.org/9158001/diff/11001/dart/tests/language/src/Syn...
File dart/tests/language/src/SyntaxTest.dart (right):

http://codereview.chromium.org/9158001/diff/11001/dart/tests/language/src/Syn...
dart/tests/language/src/SyntaxTest.dart:224: assert(null is void); /// 61:
compile-time error
On 2012/01/10 08:07:09, ngeoffray wrote:
> assert -> print? Just to make sure no one skips the expression.

Done.

http://codereview.chromium.org/9158001/diff/11001/dart/tests/language/src/Syn...
dart/tests/language/src/SyntaxTest.dart:233: typedef <T>(); /// 62: compile-time
error
On 2012/01/10 08:05:56, ahe wrote:
> I should move this up before the main method and renumber the tests.

Done.

http://codereview.chromium.org/9158001/diff/11001/dart/tests/language/src/Syn...
dart/tests/language/src/SyntaxTest.dart:234: class B extends void {} /// 63:
compile-time error
On 2012/01/10 08:05:56, ahe wrote:
> I should also move this. This should be:
> 
> class B
> extends void /// XX: compile-time error
> {}
> 
> And I should remember to call new B() from the main method.

Done.

Powered by Google App Engine
This is Rietveld 408576698