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

Side by Side Diff: pkg/analyzer/lib/src/context/context.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.context.context; 5 library analyzer.src.context.context;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/instrumentation/instrumentation.dart'; 10 import 'package:analyzer/instrumentation/instrumentation.dart';
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 bool needsRecompute = this._options.analyzeFunctionBodiesPredicate != 260 bool needsRecompute = this._options.analyzeFunctionBodiesPredicate !=
261 options.analyzeFunctionBodiesPredicate || 261 options.analyzeFunctionBodiesPredicate ||
262 this._options.generateImplicitErrors != 262 this._options.generateImplicitErrors !=
263 options.generateImplicitErrors || 263 options.generateImplicitErrors ||
264 this._options.generateSdkErrors != options.generateSdkErrors || 264 this._options.generateSdkErrors != options.generateSdkErrors ||
265 this._options.dart2jsHint != options.dart2jsHint || 265 this._options.dart2jsHint != options.dart2jsHint ||
266 (this._options.hint && !options.hint) || 266 (this._options.hint && !options.hint) ||
267 (this._options.lint && !options.lint) || 267 (this._options.lint && !options.lint) ||
268 this._options.preserveComments != options.preserveComments || 268 this._options.preserveComments != options.preserveComments ||
269 this._options.strongMode != options.strongMode || 269 this._options.strongMode != options.strongMode ||
270 this._options.enableAssertMessage != options.enableAssertMessage ||
270 this._options.enableStrictCallChecks != 271 this._options.enableStrictCallChecks !=
271 options.enableStrictCallChecks || 272 options.enableStrictCallChecks ||
272 this._options.enableGenericMethods != options.enableGenericMethods || 273 this._options.enableGenericMethods != options.enableGenericMethods ||
273 this._options.enableSuperMixins != options.enableSuperMixins; 274 this._options.enableSuperMixins != options.enableSuperMixins;
274 int cacheSize = options.cacheSize; 275 int cacheSize = options.cacheSize;
275 if (this._options.cacheSize != cacheSize) { 276 if (this._options.cacheSize != cacheSize) {
276 this._options.cacheSize = cacheSize; 277 this._options.cacheSize = cacheSize;
277 } 278 }
278 this._options.analyzeFunctionBodiesPredicate = 279 this._options.analyzeFunctionBodiesPredicate =
279 options.analyzeFunctionBodiesPredicate; 280 options.analyzeFunctionBodiesPredicate;
280 this._options.generateImplicitErrors = options.generateImplicitErrors; 281 this._options.generateImplicitErrors = options.generateImplicitErrors;
281 this._options.generateSdkErrors = options.generateSdkErrors; 282 this._options.generateSdkErrors = options.generateSdkErrors;
282 this._options.dart2jsHint = options.dart2jsHint; 283 this._options.dart2jsHint = options.dart2jsHint;
283 this._options.enableGenericMethods = options.enableGenericMethods; 284 this._options.enableGenericMethods = options.enableGenericMethods;
285 this._options.enableAssertMessage = options.enableAssertMessage;
284 this._options.enableStrictCallChecks = options.enableStrictCallChecks; 286 this._options.enableStrictCallChecks = options.enableStrictCallChecks;
285 this._options.enableSuperMixins = options.enableSuperMixins; 287 this._options.enableSuperMixins = options.enableSuperMixins;
286 this._options.hint = options.hint; 288 this._options.hint = options.hint;
287 this._options.incremental = options.incremental; 289 this._options.incremental = options.incremental;
288 this._options.incrementalApi = options.incrementalApi; 290 this._options.incrementalApi = options.incrementalApi;
289 this._options.incrementalValidation = options.incrementalValidation; 291 this._options.incrementalValidation = options.incrementalValidation;
290 this._options.lint = options.lint; 292 this._options.lint = options.lint;
291 this._options.preserveComments = options.preserveComments; 293 this._options.preserveComments = options.preserveComments;
292 this._options.strongMode = options.strongMode; 294 this._options.strongMode = options.strongMode;
293 if (needsRecompute) { 295 if (needsRecompute) {
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 DartSdk sdk = factory.dartSdk; 2158 DartSdk sdk = factory.dartSdk;
2157 if (sdk == null) { 2159 if (sdk == null) {
2158 throw new IllegalArgumentException( 2160 throw new IllegalArgumentException(
2159 "The source factory for an SDK analysis context must have a DartUriRes olver"); 2161 "The source factory for an SDK analysis context must have a DartUriRes olver");
2160 } 2162 }
2161 return new AnalysisCache(<CachePartition>[ 2163 return new AnalysisCache(<CachePartition>[
2162 AnalysisEngine.instance.partitionManager_new.forSdk(sdk) 2164 AnalysisEngine.instance.partitionManager_new.forSdk(sdk)
2163 ]); 2165 ]);
2164 } 2166 }
2165 } 2167 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/ast.dart » ('j') | pkg/analyzer/lib/src/generated/ast.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698