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

Issue 8508016: Create class AST nodes. (Closed)

Created:
9 years, 1 month ago by ahe
Modified:
9 years, 1 month ago
Reviewers:
ngeoffray, kasperl
CC:
reviews_dartlang.org, karlklose, floitsch
Visibility:
Public.

Description

Create class AST nodes. Committed: https://code.google.com/p/dart/source/detail?r=1399

Patch Set 1 #

Total comments: 12

Patch Set 2 : Rebased and review comments #

Patch Set 3 : Hack around frog bug #

Patch Set 4 : frogsh #

Patch Set 5 : frogsh #

Unified diffs Side-by-side diffs Delta from patch set Stats (+466 lines, -225 lines) Patch
M dart/frog/frogsh View 1 2 3 4 56 chunks +300 lines, -157 lines 0 comments Download
M dart/frog/leg/scanner/listener.dart View 1 8 chunks +38 lines, -18 lines 0 comments Download
M dart/frog/leg/scanner/parser.dart View 1 2 6 chunks +79 lines, -44 lines 0 comments Download
M dart/frog/leg/scanner/parser_bench.dart View 1 chunk +1 line, -1 line 0 comments Download
M dart/frog/leg/scanner/scanner_task.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M dart/frog/leg/tree/nodes.dart View 1 1 chunk +9 lines, -1 line 0 comments Download
M dart/frog/tests/leg/src/ResolverTest.dart View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M dart/frog/tests/leg_only/leg_only.status View 1 1 chunk +5 lines, -0 lines 0 comments Download
A dart/frog/tests/leg_only/src/BasicClassTest.dart View 1 chunk +27 lines, -0 lines 0 comments Download
M dart/frog/world.dart View 1 1 chunk +2 lines, -0 lines 0 comments Download
M dart/tools/testing/test_configuration.py View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
ahe
9 years, 1 month ago (2011-11-09 17:39:57 UTC) #1
kasperl
LGTM. http://codereview.chromium.org/8508016/diff/1/dart/frog/leg/scanner/listener.dart File dart/frog/leg/scanner/listener.dart (right): http://codereview.chromium.org/8508016/diff/1/dart/frog/leg/scanner/listener.dart#newcode21 dart/frog/leg/scanner/listener.dart:21: void endClass(int interfacesCount, Token beginToken, Token extendsKeyword, Nit: ...
9 years, 1 month ago (2011-11-10 06:37:34 UTC) #2
ahe
http://codereview.chromium.org/8508016/diff/1/dart/frog/leg/scanner/parser.dart File dart/frog/leg/scanner/parser.dart (right): http://codereview.chromium.org/8508016/diff/1/dart/frog/leg/scanner/parser.dart#newcode11 dart/frog/leg/scanner/parser.dart:11: Function beginTypeArguments; On 2011/11/10 06:37:34, kasperl wrote: > I ...
9 years, 1 month ago (2011-11-10 07:59:46 UTC) #3
ngeoffray
LGTM! Thanks for the testing/leg_only fix. http://codereview.chromium.org/8508016/diff/1/dart/frog/leg/scanner/listener.dart File dart/frog/leg/scanner/listener.dart (right): http://codereview.chromium.org/8508016/diff/1/dart/frog/leg/scanner/listener.dart#newcode256 dart/frog/leg/scanner/listener.dart:256: TypeAnnotation supertype = ...
9 years, 1 month ago (2011-11-10 08:27:42 UTC) #4
ahe
9 years, 1 month ago (2011-11-10 13:37:23 UTC) #5
Hi Kasper and Nicolas,

Thanks for taking a look.

Cheers,
Peter

http://codereview.chromium.org/8508016/diff/1/dart/frog/leg/scanner/listener....
File dart/frog/leg/scanner/listener.dart (right):

http://codereview.chromium.org/8508016/diff/1/dart/frog/leg/scanner/listener....
dart/frog/leg/scanner/listener.dart:21: void endClass(int interfacesCount, Token
beginToken, Token extendsKeyword,
On 2011/11/10 06:37:34, kasperl wrote:
> Nit: Somehow the use of keyword in this file seems a bit too precise. Maybe
> rename extendsKeyword to extendsToken (and friends) to make it clear that
> whether or not something is a keyword is a detail.

In this case, I think I get the maximum value from writing:

Token extendsKeyword

Compared to:

Token extendsToken

http://codereview.chromium.org/8508016/diff/1/dart/frog/leg/scanner/listener....
dart/frog/leg/scanner/listener.dart:256: TypeAnnotation supertype = popNode();
On 2011/11/10 08:27:42, ngeoffray wrote:
> Type variables were already popped, or not pushed?

Already popped, see endTypeVariable below.

http://codereview.chromium.org/8508016/diff/1/dart/frog/leg/scanner/listener....
dart/frog/leg/scanner/listener.dart:353: TypeAnnotation supertype = popNode();
On 2011/11/10 08:27:42, ngeoffray wrote:
> TODO(ahe): type variables?

Done.

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

http://codereview.chromium.org/8508016/diff/1/dart/frog/leg/scanner/parser.da...
dart/frog/leg/scanner/parser.dart:197: listener.handleNoType(token);
On 2011/11/10 08:27:42, ngeoffray wrote:
> Should that be handleNoSuperType instead?

Not necessarily. I could change it if someone has a concrete use case.

http://codereview.chromium.org/8508016/diff/1/dart/frog/leg/scanner/parser.da...
dart/frog/leg/scanner/parser.dart:289: Token parseStuff(Token token, Function
beginStuff, Function stuffParser,
On 2011/11/10 06:37:34, kasperl wrote:
> It would be nice with a more saying name for this. For now, a comment would
> probably help (explain the format of what parseStuff deals with).

Added TODO.

Powered by Google App Engine
This is Rietveld 408576698