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

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

Issue 1480433002: Add support for assert statements with messages to the analyzer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 library analyzer.src.task.dart; 5 library analyzer.src.task.dart;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/context/cache.dart'; 9 import 'package:analyzer/src/context/cache.dart';
10 import 'package:analyzer/src/generated/ast.dart'; 10 import 'package:analyzer/src/generated/ast.dart';
(...skipping 5091 matching lines...) Expand 10 before | Expand all | Expand 10 after
5102 errorReporter, libraryElement, typeProvider, context.declaredVariables); 5102 errorReporter, libraryElement, typeProvider, context.declaredVariables);
5103 unit.accept(constantVerifier); 5103 unit.accept(constantVerifier);
5104 // 5104 //
5105 // Use the ErrorVerifier to compute errors. 5105 // Use the ErrorVerifier to compute errors.
5106 // 5106 //
5107 ErrorVerifier errorVerifier = new ErrorVerifier( 5107 ErrorVerifier errorVerifier = new ErrorVerifier(
5108 errorReporter, 5108 errorReporter,
5109 libraryElement, 5109 libraryElement,
5110 typeProvider, 5110 typeProvider,
5111 new InheritanceManager(libraryElement), 5111 new InheritanceManager(libraryElement),
5112 context.analysisOptions.enableSuperMixins); 5112 context.analysisOptions.enableSuperMixins,
5113 context.analysisOptions.enableAssertMessage);
5113 unit.accept(errorVerifier); 5114 unit.accept(errorVerifier);
5114 5115
5115 // 5116 //
5116 // Record outputs. 5117 // Record outputs.
5117 // 5118 //
5118 outputs[VERIFY_ERRORS] = removeDuplicateErrors(errorListener.errors); 5119 outputs[VERIFY_ERRORS] = removeDuplicateErrors(errorListener.errors);
5119 } 5120 }
5120 5121
5121 /** 5122 /**
5122 * Check each directive in the given [unit] to see if the referenced source 5123 * Check each directive in the given [unit] to see if the referenced source
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
5273 5274
5274 @override 5275 @override
5275 bool moveNext() { 5276 bool moveNext() {
5276 if (_newSources.isEmpty) { 5277 if (_newSources.isEmpty) {
5277 return false; 5278 return false;
5278 } 5279 }
5279 currentTarget = _newSources.removeLast(); 5280 currentTarget = _newSources.removeLast();
5280 return true; 5281 return true;
5281 } 5282 }
5282 } 5283 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698