| Index: pkg/analyzer/lib/src/generated/engine.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
|
| index 0e8f9c831b9d99678f39e38a5996be780e3cc176..3f8dc4c5a0a6798651602e967c971a436b9cbb9e 100644
|
| --- a/pkg/analyzer/lib/src/generated/engine.dart
|
| +++ b/pkg/analyzer/lib/src/generated/engine.dart
|
| @@ -556,7 +556,8 @@ abstract class AnalysisContext {
|
| * Perform work until the given [result] has been computed for the given
|
| * [target]. Return the computed value.
|
| */
|
| - Object /*V*/ computeResult(AnalysisTarget target, ResultDescriptor /*<V>*/ result);
|
| + Object /*V*/ computeResult(
|
| + AnalysisTarget target, ResultDescriptor /*<V>*/ result);
|
|
|
| /**
|
| * Notifies the context that the client is going to stop using this context.
|
| @@ -729,7 +730,8 @@ abstract class AnalysisContext {
|
| * If the corresponding [target] does not exist, or the [result] is not
|
| * computed yet, then the default value is returned.
|
| */
|
| - Object /*V*/ getResult(AnalysisTarget target, ResultDescriptor /*<V>*/ result);
|
| + Object /*V*/ getResult(
|
| + AnalysisTarget target, ResultDescriptor /*<V>*/ result);
|
|
|
| /**
|
| * Return a list of the sources being analyzed in this context whose full path
|
| @@ -1131,6 +1133,7 @@ class AnalysisContextImpl implements InternalAnalysisContext {
|
| (this._options.hint && !options.hint) ||
|
| this._options.preserveComments != options.preserveComments ||
|
| this._options.strongMode != options.strongMode ||
|
| + this._options.enableAssertMessage != options.enableAssertMessage ||
|
| this._options.enableStrictCallChecks !=
|
| options.enableStrictCallChecks ||
|
| this._options.enableSuperMixins != options.enableSuperMixins;
|
| @@ -1158,6 +1161,7 @@ class AnalysisContextImpl implements InternalAnalysisContext {
|
| this._options.generateImplicitErrors = options.generateImplicitErrors;
|
| this._options.generateSdkErrors = options.generateSdkErrors;
|
| this._options.dart2jsHint = options.dart2jsHint;
|
| + this._options.enableAssertMessage = options.enableAssertMessage;
|
| this._options.enableStrictCallChecks = options.enableStrictCallChecks;
|
| this._options.enableSuperMixins = options.enableSuperMixins;
|
| this._options.hint = options.hint;
|
| @@ -6185,6 +6189,11 @@ abstract class AnalysisOptions {
|
| bool get dart2jsHint;
|
|
|
| /**
|
| + * Return `true` to enable custom assert messages (DEP 37).
|
| + */
|
| + bool get enableAssertMessage;
|
| +
|
| + /**
|
| * Return `true` if analysis is to include the new async support.
|
| */
|
| @deprecated // Always true
|
| @@ -6318,6 +6327,12 @@ class AnalysisOptionsImpl implements AnalysisOptions {
|
| bool dart2jsHint = false;
|
|
|
| /**
|
| + * A flag indicating whether custom assert messages are to be supported (DEP
|
| + * 37).
|
| + */
|
| + bool enableAssertMessage = false;
|
| +
|
| + /**
|
| * A flag indicating whether generic methods are to be supported (DEP 22).
|
| */
|
| bool enableGenericMethods = false;
|
| @@ -6399,6 +6414,7 @@ class AnalysisOptionsImpl implements AnalysisOptions {
|
| analyzeFunctionBodiesPredicate = options.analyzeFunctionBodiesPredicate;
|
| cacheSize = options.cacheSize;
|
| dart2jsHint = options.dart2jsHint;
|
| + enableAssertMessage = options.enableAssertMessage;
|
| enableStrictCallChecks = options.enableStrictCallChecks;
|
| enableSuperMixins = options.enableSuperMixins;
|
| generateImplicitErrors = options.generateImplicitErrors;
|
| @@ -6420,6 +6436,7 @@ class AnalysisOptionsImpl implements AnalysisOptions {
|
| analyzeFunctionBodiesPredicate = options.analyzeFunctionBodiesPredicate;
|
| cacheSize = options.cacheSize;
|
| dart2jsHint = options.dart2jsHint;
|
| + enableAssertMessage = options.enableAssertMessage;
|
| enableStrictCallChecks = options.enableStrictCallChecks;
|
| enableSuperMixins = options.enableSuperMixins;
|
| generateImplicitErrors = options.generateImplicitErrors;
|
| @@ -9288,7 +9305,8 @@ class IncrementalAnalysisTask extends AnalysisTask {
|
| }
|
| // Produce an updated AST
|
| IncrementalParser parser = new IncrementalParser(
|
| - cache.source, scanner.tokenMap, AnalysisErrorListener.NULL_LISTENER);
|
| + cache.source, scanner.tokenMap, AnalysisErrorListener.NULL_LISTENER,
|
| + enableAssertMessage: context.analysisOptions.enableAssertMessage);
|
| _updatedUnit = parser.reparse(cache.resolvedUnit, scanner.leftToken,
|
| scanner.rightToken, cache.offset, cache.offset + cache.oldLength);
|
| // Update the resolution
|
| @@ -9718,7 +9736,8 @@ class ParseDartTask extends AnalysisTask {
|
| //
|
| PerformanceStatistics.parse.makeCurrentWhile(() {
|
| RecordingErrorListener errorListener = new RecordingErrorListener();
|
| - Parser parser = new Parser(source, errorListener);
|
| + Parser parser = new Parser(source, errorListener,
|
| + enableAssertMessage: context.analysisOptions.enableAssertMessage);
|
| AnalysisOptions options = context.analysisOptions;
|
| parser.parseFunctionBodies =
|
| options.analyzeFunctionBodiesPredicate(source);
|
|
|