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

Unified Diff: lib/src/checker/checker.dart

Issue 1067553004: Factor out reporting from rules (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: Change set/get pair to field Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/devc.dart ('k') | lib/src/checker/rules.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/checker/checker.dart
diff --git a/lib/src/checker/checker.dart b/lib/src/checker/checker.dart
index 024a066ca63de43dfab84015068e927b21c4657c..58d18f0e753c8306c15de20629bfe81ed3b0df07 100644
--- a/lib/src/checker/checker.dart
+++ b/lib/src/checker/checker.dart
@@ -347,6 +347,17 @@ class CodeChecker extends RecursiveAstVisitor {
_reporter = reporter,
_overrideChecker = new _OverrideChecker(rules, reporter, options);
+ @override
+ visitCompilationUnit(CompilationUnit unit) {
+ void report(Expression expr) {
+ _reporter.log(new MissingTypeError(expr));
+ }
+ var callback = _rules.reportMissingType;
+ _rules.reportMissingType = report;
+ unit.visitChildren(this);
+ _rules.reportMissingType = callback;
+ }
+
_visitMaybeConst(AstNode n, visitNode(AstNode n)) {
var o = _constantContext;
if (!o) {
« no previous file with comments | « lib/devc.dart ('k') | lib/src/checker/rules.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698