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

Issue 10836034: Properly parse operator declarations without return type. (Closed)

Created:
8 years, 4 months ago by Anton Muhin
Modified:
8 years, 4 months ago
Reviewers:
ahe, Roman
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Properly parse operator declarations without return type. Formerly, 'operator' token was parsed as a return type, fix it. Emit a space if operator name is 'negative' as otherwise it's unparsed as 'operatornegative'. R=ahe@google.com,smok@google.com Committed: https://code.google.com/p/dart/source/detail?r=10283

Patch Set 1 #

Total comments: 2

Patch Set 2 : Next iteration #

Total comments: 8

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -8 lines) Patch
M lib/compiler/implementation/scanner/parser.dart View 1 chunk +10 lines, -4 lines 0 comments Download
M lib/compiler/implementation/tree/unparser.dart View 1 1 chunk +1 line, -0 lines 0 comments Download
M tests/compiler/dart2js/parser_test.dart View 1 2 2 chunks +13 lines, -0 lines 0 comments Download
M tests/language/language.status View 1 2 chunks +2 lines, -4 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Anton Muhin
8 years, 4 months ago (2012-07-31 18:52:29 UTC) #1
ahe
What about a test case? http://codereview.chromium.org/10836034/diff/1/lib/compiler/implementation/tree/unparser.dart File lib/compiler/implementation/tree/unparser.dart (right): http://codereview.chromium.org/10836034/diff/1/lib/compiler/implementation/tree/unparser.dart#newcode111 lib/compiler/implementation/tree/unparser.dart:111: if (send.selector.token.stringValue === 'negate') ...
8 years, 4 months ago (2012-08-02 13:39:39 UTC) #2
Anton Muhin
Peter, sorry for delay. Test added, comments addressed, ptal. http://codereview.chromium.org/10836034/diff/1/lib/compiler/implementation/tree/unparser.dart File lib/compiler/implementation/tree/unparser.dart (right): http://codereview.chromium.org/10836034/diff/1/lib/compiler/implementation/tree/unparser.dart#newcode111 lib/compiler/implementation/tree/unparser.dart:111: ...
8 years, 4 months ago (2012-08-06 09:20:09 UTC) #3
ahe
LGTM if you address the comments. http://codereview.chromium.org/10836034/diff/5001/tests/compiler/dart2js/parser_test.dart File tests/compiler/dart2js/parser_test.dart (right): http://codereview.chromium.org/10836034/diff/5001/tests/compiler/dart2js/parser_test.dart#newcode259 tests/compiler/dart2js/parser_test.dart:259: FunctionExpression expr = ...
8 years, 4 months ago (2012-08-06 10:35:37 UTC) #4
Anton Muhin
8 years, 4 months ago (2012-08-06 11:36:18 UTC) #5
http://codereview.chromium.org/10836034/diff/5001/tests/compiler/dart2js/pars...
File tests/compiler/dart2js/parser_test.dart (right):

http://codereview.chromium.org/10836034/diff/5001/tests/compiler/dart2js/pars...
tests/compiler/dart2js/parser_test.dart:259: FunctionExpression expr =
node.function;
On 2012/08/06 10:35:38, ahe wrote:
> Look at the rest of this file. We don't abbreviate expression.

Done.

http://codereview.chromium.org/10836034/diff/5001/tests/compiler/dart2js/pars...
tests/compiler/dart2js/parser_test.dart:261: Expect.isTrue(name is Send);
On 2012/08/06 10:35:38, ahe wrote:
> See the above code in testPostfix. This should be:
> 
> Send name;
> Expect.isNotNull(name = expr.name.asSendSet());

Done.

http://codereview.chromium.org/10836034/diff/5001/tests/compiler/dart2js/pars...
tests/compiler/dart2js/parser_test.dart:262:
Expect.equals(name.receiver.source.stringValue, 'operator');
On 2012/08/06 10:35:38, ahe wrote:
> Use stringEquals and put the expected value first.

Done.

http://codereview.chromium.org/10836034/diff/5001/tests/compiler/dart2js/pars...
tests/compiler/dart2js/parser_test.dart:263:
Expect.equals(name.selector.source.stringValue, 'negate');
On 2012/08/06 10:35:38, ahe wrote:
> Ditto.

Done.

Powered by Google App Engine
This is Rietveld 408576698