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

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

Issue 11030048: Minor fixes in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 abstract class Visitor<R> { 5 abstract class Visitor<R> {
6 const Visitor(); 6 const Visitor();
7 7
8 abstract R visitNode(Node node); 8 abstract R visitNode(Node node);
9 9
10 R visitBlock(Block node) => visitStatement(node); 10 R visitBlock(Block node) => visitStatement(node);
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 } 1117 }
1118 1118
1119 Token getBeginToken() => beginToken; 1119 Token getBeginToken() => beginToken;
1120 1120
1121 Token getEndToken() => beginToken.endGroup; 1121 Token getEndToken() => beginToken.endGroup;
1122 } 1122 }
1123 1123
1124 /** Representation of modifiers such as static, abstract, final, etc. */ 1124 /** Representation of modifiers such as static, abstract, final, etc. */
1125 class Modifiers extends Node { 1125 class Modifiers extends Node {
1126 /** 1126 /**
1127 * Pseudo-constant for empty modifiers. Use this instead of null. 1127 * Pseudo-constant for empty modifiers.
1128 */ 1128 */
1129 static final Modifiers EMPTY = new Modifiers(new NodeList.empty()); 1129 static final Modifiers EMPTY = new Modifiers(new NodeList.empty());
1130 1130
1131 /* TODO(ahe): The following should be validated relating to modifiers: 1131 /* TODO(ahe): The following should be validated relating to modifiers:
1132 * 1. The nodes must come in a certain order. 1132 * 1. The nodes must come in a certain order.
1133 * 2. The keywords "var" and "final" may not be used at the same time. 1133 * 2. The keywords "var" and "final" may not be used at the same time.
1134 * 3. The keywords "abstract" and "external" may not be used at the same time. 1134 * 3. The keywords "abstract" and "external" may not be used at the same time.
1135 * 4. The type of an element must be null if isVar() is true. 1135 * 4. The type of an element must be null if isVar() is true.
1136 */ 1136 */
1137 1137
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
1951 * argument). 1951 * argument).
1952 * 1952 *
1953 * TODO(ahe): This method is controversial, the team needs to discuss 1953 * TODO(ahe): This method is controversial, the team needs to discuss
1954 * if top-level methods are acceptable and what naming conventions to 1954 * if top-level methods are acceptable and what naming conventions to
1955 * use. 1955 * use.
1956 */ 1956 */
1957 initializerDo(Node node, f(Node node)) { 1957 initializerDo(Node node, f(Node node)) {
1958 SendSet send = node.asSendSet(); 1958 SendSet send = node.asSendSet();
1959 if (send !== null) return f(send.arguments.head); 1959 if (send !== null) return f(send.arguments.head);
1960 } 1960 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698