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

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

Issue 2791993002: Fix dart2js warnings and add test to ensure it stays clean. (Closed)
Patch Set: Address comments and fix duplicated library names. Created 3 years, 8 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/variable_allocator.dart ('k') | pkg/compiler/testing.json » ('j') | 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 import 'dart:collection' show IterableMixin; 5 import 'dart:collection' show IterableMixin;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../elements/elements.dart' show MetadataAnnotation; 8 import '../elements/elements.dart' show MetadataAnnotation;
9 import 'package:front_end/src/fasta/scanner/precedence.dart' as Precedence 9 import 'package:front_end/src/fasta/scanner/precedence.dart' as Precedence
10 show FUNCTION_INFO; 10 show FUNCTION_INFO;
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 R visitMixinApplication(MixinApplication node, A arg) => visitNode(node, arg); 232 R visitMixinApplication(MixinApplication node, A arg) => visitNode(node, arg);
233 R visitModifiers(Modifiers node, A arg) => visitNode(node, arg); 233 R visitModifiers(Modifiers node, A arg) => visitNode(node, arg);
234 R visitNamedArgument(NamedArgument node, A arg) => visitExpression(node, arg); 234 R visitNamedArgument(NamedArgument node, A arg) => visitExpression(node, arg);
235 R visitNamedMixinApplication(NamedMixinApplication node, A arg) { 235 R visitNamedMixinApplication(NamedMixinApplication node, A arg) {
236 return visitMixinApplication(node, arg); 236 return visitMixinApplication(node, arg);
237 } 237 }
238 238
239 R visitNewExpression(NewExpression node, A arg) => visitExpression(node, arg); 239 R visitNewExpression(NewExpression node, A arg) => visitExpression(node, arg);
240 R visitNodeList(NodeList node, A arg) => visitNode(node, arg); 240 R visitNodeList(NodeList node, A arg) => visitNode(node, arg);
241 R visitNominalTypeAnnotation(NominalTypeAnnotation node, A arg) { 241 R visitNominalTypeAnnotation(NominalTypeAnnotation node, A arg) {
242 visitTypeAnnotation(node, arg); 242 return visitTypeAnnotation(node, arg);
243 } 243 }
244 244
245 R visitOperator(Operator node, A arg) => visitIdentifier(node, arg); 245 R visitOperator(Operator node, A arg) => visitIdentifier(node, arg);
246 R visitParenthesizedExpression(ParenthesizedExpression node, A arg) { 246 R visitParenthesizedExpression(ParenthesizedExpression node, A arg) {
247 return visitExpression(node, arg); 247 return visitExpression(node, arg);
248 } 248 }
249 249
250 R visitPart(Part node, A arg) => visitLibraryTag(node, arg); 250 R visitPart(Part node, A arg) => visitLibraryTag(node, arg);
251 R visitPartOf(PartOf node, A arg) => visitNode(node, arg); 251 R visitPartOf(PartOf node, A arg) => visitNode(node, arg);
252 R visitPostfix(Postfix node, A arg) => visitNodeList(node, arg); 252 R visitPostfix(Postfix node, A arg) => visitNodeList(node, arg);
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 LiteralInt asLiteralInt() => this; 1211 LiteralInt asLiteralInt() => this;
1212 1212
1213 int get value { 1213 int get value {
1214 try { 1214 try {
1215 Token valueToken = token; 1215 Token valueToken = token;
1216 if (identical(valueToken.kind, Tokens.PLUS_TOKEN)) { 1216 if (identical(valueToken.kind, Tokens.PLUS_TOKEN)) {
1217 valueToken = valueToken.next; 1217 valueToken = valueToken.next;
1218 } 1218 }
1219 return int.parse(valueToken.lexeme); 1219 return int.parse(valueToken.lexeme);
1220 } on FormatException catch (ex) { 1220 } on FormatException catch (ex) {
1221 (this.handler)(token, ex); 1221 throw handler(token, ex);
1222 } 1222 }
1223 } 1223 }
1224 1224
1225 accept(Visitor visitor) => visitor.visitLiteralInt(this); 1225 accept(Visitor visitor) => visitor.visitLiteralInt(this);
1226 1226
1227 accept1(Visitor1 visitor, arg) => visitor.visitLiteralInt(this, arg); 1227 accept1(Visitor1 visitor, arg) => visitor.visitLiteralInt(this, arg);
1228 } 1228 }
1229 1229
1230 class LiteralDouble extends Literal<double> { 1230 class LiteralDouble extends Literal<double> {
1231 LiteralDouble(Token token, DecodeErrorHandler handler) 1231 LiteralDouble(Token token, DecodeErrorHandler handler)
1232 : super(token, handler); 1232 : super(token, handler);
1233 1233
1234 LiteralDouble asLiteralDouble() => this; 1234 LiteralDouble asLiteralDouble() => this;
1235 1235
1236 double get value { 1236 double get value {
1237 try { 1237 try {
1238 Token valueToken = token; 1238 Token valueToken = token;
1239 if (identical(valueToken.kind, Tokens.PLUS_TOKEN)) { 1239 if (identical(valueToken.kind, Tokens.PLUS_TOKEN)) {
1240 valueToken = valueToken.next; 1240 valueToken = valueToken.next;
1241 } 1241 }
1242 return double.parse(valueToken.lexeme); 1242 return double.parse(valueToken.lexeme);
1243 } on FormatException catch (ex) { 1243 } on FormatException catch (ex) {
1244 (this.handler)(token, ex); 1244 throw handler(token, ex);
1245 } 1245 }
1246 } 1246 }
1247 1247
1248 accept(Visitor visitor) => visitor.visitLiteralDouble(this); 1248 accept(Visitor visitor) => visitor.visitLiteralDouble(this);
1249 1249
1250 accept1(Visitor1 visitor, arg) => visitor.visitLiteralDouble(this, arg); 1250 accept1(Visitor1 visitor, arg) => visitor.visitLiteralDouble(this, arg);
1251 } 1251 }
1252 1252
1253 class LiteralBool extends Literal<bool> { 1253 class LiteralBool extends Literal<bool> {
1254 LiteralBool(Token token, DecodeErrorHandler handler) : super(token, handler); 1254 LiteralBool(Token token, DecodeErrorHandler handler) : super(token, handler);
(...skipping 2023 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/ssa/variable_allocator.dart ('k') | pkg/compiler/testing.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698