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

Side by Side Diff: pkg/compiler/lib/src/tree/nodes.dart

Issue 2872453004: cleanup TokenType var names (Closed)
Patch Set: Created 3 years, 7 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
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 import 'dart:collection' show IterableMixin; 5 import 'dart:collection' show IterableMixin;
6 6
7 import 'package:front_end/src/fasta/fasta_codes.dart' show FastaMessage; 7 import 'package:front_end/src/fasta/fasta_codes.dart' show FastaMessage;
8 import 'package:front_end/src/fasta/scanner.dart' show BeginGroupToken, Token; 8 import 'package:front_end/src/fasta/scanner.dart' show BeginGroupToken, Token;
9 import 'package:front_end/src/fasta/scanner/token_constants.dart' as Tokens 9 import 'package:front_end/src/fasta/scanner/token_constants.dart' as Tokens
10 show PLUS_TOKEN; 10 show PLUS_TOKEN;
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1520 final Token beginToken; 1520 final Token beginToken;
1521 final Token endToken; 1521 final Token endToken;
1522 1522
1523 Return(this.beginToken, this.endToken, this.expression); 1523 Return(this.beginToken, this.endToken, this.expression);
1524 1524
1525 Return asReturn() => this; 1525 Return asReturn() => this;
1526 1526
1527 bool get hasExpression => expression != null; 1527 bool get hasExpression => expression != null;
1528 1528
1529 /// `true` if this return is of the form `=> e;`. 1529 /// `true` if this return is of the form `=> e;`.
1530 bool get isArrowBody => beginToken.info == TokenType.FUNCTION; 1530 bool get isArrowBody => beginToken.type == TokenType.FUNCTION;
1531 1531
1532 accept(Visitor visitor) => visitor.visitReturn(this); 1532 accept(Visitor visitor) => visitor.visitReturn(this);
1533 1533
1534 accept1(Visitor1 visitor, arg) => visitor.visitReturn(this, arg); 1534 accept1(Visitor1 visitor, arg) => visitor.visitReturn(this, arg);
1535 1535
1536 visitChildren(Visitor visitor) { 1536 visitChildren(Visitor visitor) {
1537 if (expression != null) expression.accept(visitor); 1537 if (expression != null) expression.accept(visitor);
1538 } 1538 }
1539 1539
1540 visitChildren1(Visitor1 visitor, arg) { 1540 visitChildren1(Visitor1 visitor, arg) {
(...skipping 1737 matching lines...) Expand 10 before | Expand all | Expand 10 after
3278 */ 3278 */
3279 Object getTreeElement(TreeElementMixin node) => node._element; 3279 Object getTreeElement(TreeElementMixin node) => node._element;
3280 3280
3281 /** 3281 /**
3282 * Do not call this method directly. Instead, use an instance of 3282 * Do not call this method directly. Instead, use an instance of
3283 * TreeElements. 3283 * TreeElements.
3284 */ 3284 */
3285 void setTreeElement(TreeElementMixin node, Object value) { 3285 void setTreeElement(TreeElementMixin node, Object value) {
3286 node._element = value; 3286 node._element = value;
3287 } 3287 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/serialization/serialization.dart ('k') | pkg/front_end/lib/src/fasta/parser/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698