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

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

Issue 1693083004: Move scanner out of generated and clean up imports (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: clean up Created 4 years, 10 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) 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 Token, TokenType;
11 import 'package:analyzer/dart/ast/visitor.dart'; 12 import 'package:analyzer/dart/ast/visitor.dart';
12 import 'package:analyzer/dart/element/element.dart'; 13 import 'package:analyzer/dart/element/element.dart';
13 import 'package:analyzer/dart/element/type.dart'; 14 import 'package:analyzer/dart/element/type.dart';
14 import 'package:analyzer/src/dart/element/type.dart'; 15 import 'package:analyzer/src/dart/element/type.dart';
15 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider; 16 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
16 import 'package:analyzer/src/generated/scanner.dart' show Token, TokenType;
17 import 'package:analyzer/src/generated/type_system.dart'; 17 import 'package:analyzer/src/generated/type_system.dart';
18 18
19 import 'info.dart'; 19 import 'info.dart';
20 20
21 DartType _elementType(Element e) { 21 DartType _elementType(Element e) {
22 if (e == null) { 22 if (e == null) {
23 // Malformed code - just return dynamic. 23 // Malformed code - just return dynamic.
24 return DynamicTypeImpl.instance; 24 return DynamicTypeImpl.instance;
25 } 25 }
26 return (e as dynamic).type; 26 return (e as dynamic).type;
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 } while (!current.isObject && !visited.contains(current)); 1219 } while (!current.isObject && !visited.contains(current));
1220 } 1220 }
1221 1221
1222 void _recordMessage(StaticInfo info) { 1222 void _recordMessage(StaticInfo info) {
1223 if (info == null) return; 1223 if (info == null) return;
1224 var error = info.toAnalysisError(); 1224 var error = info.toAnalysisError();
1225 if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) _failure = true; 1225 if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) _failure = true;
1226 _reporter.onError(error); 1226 _reporter.onError(error);
1227 } 1227 }
1228 } 1228 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/incremental_element_builder.dart ('k') | pkg/analyzer/lib/src/task/yaml.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698