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

Issue 10829334: Const variable declarations accepted in the parser. (Closed)

Created:
8 years, 4 months ago by Johnni Winther
Modified:
8 years, 4 months ago
Reviewers:
ahe
CC:
reviews_dartlang.org, kasperl
Visibility:
Public.

Description

Const variable declarations accepted in the parser. TEST=language/const_var_test.dart Committed: https://code.google.com/p/dart/source/detail?r=10731

Patch Set 1 #

Total comments: 6

Patch Set 2 : Updated cf. comments #

Patch Set 3 : Test helper added #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -31 lines) Patch
M lib/compiler/implementation/scanner/parser.dart View 1 13 chunks +66 lines, -22 lines 0 comments Download
M tests/co19/co19-dart2js.status View 1 chunk +14 lines, -2 lines 0 comments Download
A + tests/language/const_var_helper.dart View 1 2 1 chunk +6 lines, -7 lines 0 comments Download
A tests/language/const_var_test.dart View 1 1 chunk +30 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Johnni Winther
8 years, 4 months ago (2012-08-15 12:24:04 UTC) #1
Johnni Winther
http://codereview.chromium.org/10829334/diff/1/lib/compiler/implementation/scanner/parser.dart File lib/compiler/implementation/scanner/parser.dart (right): http://codereview.chromium.org/10829334/diff/1/lib/compiler/implementation/scanner/parser.dart#newcode834 lib/compiler/implementation/scanner/parser.dart:834: Token peekIdentifierAfterTypeOpt(Token token) { Rename to peekIdentifierAfterOptionalType http://codereview.chromium.org/10829334/diff/1/lib/compiler/implementation/scanner/parser.dart#newcode898 lib/compiler/implementation/scanner/parser.dart:898: ...
8 years, 4 months ago (2012-08-15 12:58:21 UTC) #2
ahe
LGTM if you address the comments.
8 years, 4 months ago (2012-08-15 12:59:14 UTC) #3
Johnni Winther
8 years, 4 months ago (2012-08-15 13:59:18 UTC) #4
http://codereview.chromium.org/10829334/diff/1/lib/compiler/implementation/sc...
File lib/compiler/implementation/scanner/parser.dart (right):

http://codereview.chromium.org/10829334/diff/1/lib/compiler/implementation/sc...
lib/compiler/implementation/scanner/parser.dart:834: Token
peekIdentifierAfterTypeOpt(Token token) {
On 2012/08/15 12:58:21, Johnni Winther wrote:
> Rename to peekIdentifierAfterOptionalType

Done.

http://codereview.chromium.org/10829334/diff/1/lib/compiler/implementation/sc...
lib/compiler/implementation/scanner/parser.dart:898: // We are looking at "const
type identifier" followed by '=', ';', ','.
On 2012/08/15 12:58:21, Johnni Winther wrote:
> ';', or ','

Done.

http://codereview.chromium.org/10829334/diff/1/tests/language/const_var_test....
File tests/language/const_var_test.dart (right):

http://codereview.chromium.org/10829334/diff/1/tests/language/const_var_test....
tests/language/const_var_test.dart:14: }
On 2012/08/15 12:58:21, Johnni Winther wrote:
> Add:
>  const []
>  const {}
>  const <int>[]
>  const <int>{}
>  const List()
>  const List<int>()
>  const foo.List()
>  const foo.List<int>()

Done.

Powered by Google App Engine
This is Rietveld 408576698