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

Side by Side Diff: pkg/analyzer/lib/src/task/strong/checker.dart

Issue 1907323002: Code clean-up (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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/analyzer/lib/src/generated/source_io.dart ('k') | pkg/analyzer/lib/src/task/yaml.dart » ('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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 // TODO(jmesserly): this was ported from package:dev_compiler, and needs to be 5 // TODO(jmesserly): this was ported from package:dev_compiler, and needs to be
6 // refactored to fit into analyzer. 6 // refactored to fit into analyzer.
7 library analyzer.src.task.strong.checker; 7 library analyzer.src.task.strong.checker;
8 8
9 import 'package:analyzer/analyzer.dart'; 9 import 'package:analyzer/analyzer.dart';
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
11 import 'package:analyzer/dart/ast/token.dart' show TokenType; 11 import 'package:analyzer/dart/ast/token.dart' show TokenType;
12 import 'package:analyzer/dart/ast/visitor.dart'; 12 import 'package:analyzer/dart/ast/visitor.dart';
13 import 'package:analyzer/dart/element/element.dart'; 13 import 'package:analyzer/dart/element/element.dart';
14 import 'package:analyzer/dart/element/type.dart'; 14 import 'package:analyzer/dart/element/type.dart';
15 import 'package:analyzer/src/dart/element/element.dart';
16 import 'package:analyzer/src/dart/element/type.dart'; 15 import 'package:analyzer/src/dart/element/type.dart';
17 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider; 16 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
18 import 'package:analyzer/src/generated/type_system.dart'; 17 import 'package:analyzer/src/generated/type_system.dart';
19 18
20 import 'info.dart'; 19 import 'info.dart';
21 20
22 DartType _elementType(Element e) { 21 DartType _elementType(Element e) {
23 if (e == null) { 22 if (e == null) {
24 // Malformed code - just return dynamic. 23 // Malformed code - just return dynamic.
25 return DynamicTypeImpl.instance; 24 return DynamicTypeImpl.instance;
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 } while (!current.isObject && !visited.contains(current)); 1252 } while (!current.isObject && !visited.contains(current));
1254 } 1253 }
1255 1254
1256 void _recordMessage(StaticInfo info) { 1255 void _recordMessage(StaticInfo info) {
1257 if (info == null) return; 1256 if (info == null) return;
1258 var error = info.toAnalysisError(); 1257 var error = info.toAnalysisError();
1259 if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) _failure = true; 1258 if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) _failure = true;
1260 _reporter.onError(error); 1259 _reporter.onError(error);
1261 } 1260 }
1262 } 1261 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/source_io.dart ('k') | pkg/analyzer/lib/src/task/yaml.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698