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

Side by Side Diff: pkg/analyzer/lib/src/dart/ast/utilities.dart

Issue 2605583002: Fix warnings in pkg/analyzer caused by be6a822daff2fae75a480d7da656ab0d9c86512e (Closed)
Patch Set: Created 3 years, 12 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 | « no previous file | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library analyzer.src.dart.ast.utilities; 5 library analyzer.src.dart.ast.utilities;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; 10 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
(...skipping 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after
2332 if (leftOperand is num && rightOperand is num) { 2332 if (leftOperand is num && rightOperand is num) {
2333 return leftOperand - rightOperand; 2333 return leftOperand - rightOperand;
2334 } 2334 }
2335 } else if (node.operator.type == TokenType.PERCENT) { 2335 } else if (node.operator.type == TokenType.PERCENT) {
2336 // numeric or {@code null} 2336 // numeric or {@code null}
2337 if (leftOperand is num && rightOperand is num) { 2337 if (leftOperand is num && rightOperand is num) {
2338 return leftOperand.remainder(rightOperand); 2338 return leftOperand.remainder(rightOperand);
2339 } 2339 }
2340 } else if (node.operator.type == TokenType.PLUS) { 2340 } else if (node.operator.type == TokenType.PLUS) {
2341 // numeric or {@code null} 2341 // numeric or {@code null}
2342 if ((leftOperand is num && rightOperand is num) || 2342 if (leftOperand is num && rightOperand is num) {
2343 (leftOperand is String && rightOperand is String)) { 2343 return leftOperand + rightOperand;
2344 }
2345 if (leftOperand is String && rightOperand is String) {
2344 return leftOperand + rightOperand; 2346 return leftOperand + rightOperand;
2345 } 2347 }
2346 } else if (node.operator.type == TokenType.STAR) { 2348 } else if (node.operator.type == TokenType.STAR) {
2347 // numeric or {@code null} 2349 // numeric or {@code null}
2348 if (leftOperand is num && rightOperand is num) { 2350 if (leftOperand is num && rightOperand is num) {
2349 return leftOperand * rightOperand; 2351 return leftOperand * rightOperand;
2350 } 2352 }
2351 } else if (node.operator.type == TokenType.SLASH) { 2353 } else if (node.operator.type == TokenType.SLASH) {
2352 // numeric or {@code null} 2354 // numeric or {@code null}
2353 if (leftOperand is num && rightOperand is num) { 2355 if (leftOperand is num && rightOperand is num) {
(...skipping 6834 matching lines...) Expand 10 before | Expand all | Expand 10 after
9188 if (node.star != null) { 9190 if (node.star != null) {
9189 sink.write("yield* "); 9191 sink.write("yield* ");
9190 } else { 9192 } else {
9191 sink.write("yield "); 9193 sink.write("yield ");
9192 } 9194 }
9193 safelyVisitNode(node.expression); 9195 safelyVisitNode(node.expression);
9194 sink.write(";"); 9196 sink.write(";");
9195 return null; 9197 return null;
9196 } 9198 }
9197 } 9199 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698