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

Side by Side Diff: lib/compiler/implementation/tree/nodes.dart

Issue 10697003: Various token issues fixed in the compiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Unit tests updated, co19 status updated. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 interface Visitor<R> { 5 interface Visitor<R> {
6 R visitBlock(Block node); 6 R visitBlock(Block node);
7 R visitBreakStatement(BreakStatement node); 7 R visitBreakStatement(BreakStatement node);
8 R visitCascade(Cascade node); 8 R visitCascade(Cascade node);
9 R visitCascadeReceiver(CascadeReceiver node); 9 R visitCascadeReceiver(CascadeReceiver node);
10 R visitCaseMatch(CaseMatch node); 10 R visitCaseMatch(CaseMatch node);
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 return new SendSet(newReceiver, selector, assignmentOperator, 349 return new SendSet(newReceiver, selector, assignmentOperator,
350 argumentsNode); 350 argumentsNode);
351 } 351 }
352 352
353 Token getBeginToken() { 353 Token getBeginToken() {
354 if (isPrefix) return assignmentOperator.getBeginToken(); 354 if (isPrefix) return assignmentOperator.getBeginToken();
355 return super.getBeginToken(); 355 return super.getBeginToken();
356 } 356 }
357 357
358 Token getEndToken() { 358 Token getEndToken() {
359 if (isPrefix) return super.getEndToken(); 359 if (isPostfix) return assignmentOperator.getEndToken();
360 return assignmentOperator.getEndToken(); 360 return super.getEndToken();
361 } 361 }
362 } 362 }
363 363
364 class NewExpression extends Expression { 364 class NewExpression extends Expression {
365 /** The token NEW or CONST */ 365 /** The token NEW or CONST */
366 final Token newToken; 366 final Token newToken;
367 367
368 // Note: we expect that send.receiver is null. 368 // Note: we expect that send.receiver is null.
369 final Send send; 369 final Send send;
370 370
(...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 * argument). 1740 * argument).
1741 * 1741 *
1742 * TODO(ahe): This method is controversial, the team needs to discuss 1742 * TODO(ahe): This method is controversial, the team needs to discuss
1743 * if top-level methods are acceptable and what naming conventions to 1743 * if top-level methods are acceptable and what naming conventions to
1744 * use. 1744 * use.
1745 */ 1745 */
1746 initializerDo(Node node, f(Node node)) { 1746 initializerDo(Node node, f(Node node)) {
1747 SendSet send = node.asSendSet(); 1747 SendSet send = node.asSendSet();
1748 if (send !== null) return f(send.arguments.head); 1748 if (send !== null) return f(send.arguments.head);
1749 } 1749 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698