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

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

Issue 1309543011: Add support for assert statements with messages to the analyzer. Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. Created 5 years, 3 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 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 3923 matching lines...) Expand 10 before | Expand all | Expand 10 after
3934 errorReporter, libraryElement, typeProvider, context.declaredVariables); 3934 errorReporter, libraryElement, typeProvider, context.declaredVariables);
3935 unit.accept(constantVerifier); 3935 unit.accept(constantVerifier);
3936 // 3936 //
3937 // Use the ErrorVerifier to compute errors. 3937 // Use the ErrorVerifier to compute errors.
3938 // 3938 //
3939 ErrorVerifier errorVerifier = new ErrorVerifier( 3939 ErrorVerifier errorVerifier = new ErrorVerifier(
3940 errorReporter, 3940 errorReporter,
3941 libraryElement, 3941 libraryElement,
3942 typeProvider, 3942 typeProvider,
3943 new InheritanceManager(libraryElement), 3943 new InheritanceManager(libraryElement),
3944 context.analysisOptions.enableSuperMixins); 3944 context.analysisOptions.enableSuperMixins,
3945 context.analysisOptions.enableAssertMessage);
3945 unit.accept(errorVerifier); 3946 unit.accept(errorVerifier);
3946 // 3947 //
3947 // Record outputs. 3948 // Record outputs.
3948 // 3949 //
3949 outputs[VERIFY_ERRORS] = removeDuplicateErrors(errorListener.errors); 3950 outputs[VERIFY_ERRORS] = removeDuplicateErrors(errorListener.errors);
3950 } 3951 }
3951 3952
3952 /** 3953 /**
3953 * Check each directive in the given [unit] to see if the referenced source 3954 * Check each directive in the given [unit] to see if the referenced source
3954 * exists and report an error if it does not. 3955 * exists and report an error if it does not.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
4124 4125
4125 @override 4126 @override
4126 bool moveNext() { 4127 bool moveNext() {
4127 if (_newSources.isEmpty) { 4128 if (_newSources.isEmpty) {
4128 return false; 4129 return false;
4129 } 4130 }
4130 currentTarget = _newSources.removeLast(); 4131 currentTarget = _newSources.removeLast();
4131 return true; 4132 return true;
4132 } 4133 }
4133 } 4134 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/testing/ast_factory.dart ('k') | pkg/analyzer/test/generated/ast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698