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

Issue 9950045: Implements error recovery for cases where 'var' or 'final' prefix a method def'n (Closed)

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

Description

Implements error recovery for cases where 'var' or 'final' prefix a method def'n These are common user mistakes, it prints a reasonable diagnostic as opposed to 'unexpected token'. Committed: https://code.google.com/p/dart/source/detail?r=6078

Patch Set 1 : Implements error recovery for common 'var' case #

Total comments: 11

Patch Set 2 : Adds additional unit test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+227 lines, -17 lines) Patch
M compiler/java/com/google/dart/compiler/parser/DartParser.java View 1 6 chunks +80 lines, -11 lines 0 comments Download
M compiler/java/com/google/dart/compiler/parser/ParserErrorCode.java View 1 2 chunks +3 lines, -0 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/CompilerTestCase.java View 1 chunk +7 lines, -3 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java View 1 2 chunks +129 lines, -1 line 0 comments Download
M compiler/javatests/com/google/dart/compiler/parser/TruncatedSourceParserTest.java View 1 chunk +4 lines, -1 line 0 comments Download
M compiler/javatests/com/google/dart/compiler/parser/ValidatingSyntaxTest.java View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
zundel
I'm hoping to implement a few error recovery cases in the existing parser while we ...
8 years, 8 months ago (2012-04-01 03:21:24 UTC) #1
scheglov
https://chromiumcodereview.appspot.com/9950045/diff/1008/compiler/java/com/google/dart/compiler/parser/DartParser.java File compiler/java/com/google/dart/compiler/parser/DartParser.java (right): https://chromiumcodereview.appspot.com/9950045/diff/1008/compiler/java/com/google/dart/compiler/parser/DartParser.java#newcode166 compiler/java/com/google/dart/compiler/parser/DartParser.java:166: public static final ImmutableSet<String> allPseudoKeywords = ImmutableSet.copyOf(PSEUDO_KEYWORDS); Can we ...
8 years, 8 months ago (2012-04-01 04:37:10 UTC) #2
zundel
PTAL I added a separate test for using pseudokeywords as a method or field name. ...
8 years, 8 months ago (2012-04-01 12:51:14 UTC) #3
zundel
https://chromiumcodereview.appspot.com/9950045/diff/1008/compiler/java/com/google/dart/compiler/parser/DartParser.java File compiler/java/com/google/dart/compiler/parser/DartParser.java (right): https://chromiumcodereview.appspot.com/9950045/diff/1008/compiler/java/com/google/dart/compiler/parser/DartParser.java#newcode166 compiler/java/com/google/dart/compiler/parser/DartParser.java:166: public static final ImmutableSet<String> allPseudoKeywords = ImmutableSet.copyOf(PSEUDO_KEYWORDS); On 2012/04/01 ...
8 years, 8 months ago (2012-04-01 12:59:51 UTC) #4
scheglov
8 years, 8 months ago (2012-04-01 16:50:41 UTC) #5
LGTM

Powered by Google App Engine
This is Rietveld 408576698