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

Side by Side Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 2282233002: Add support for parsing, but not capturing, assers in constructor initializer lists (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: add flag Created 4 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
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.generated.engine; 5 library analyzer.src.generated.engine;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 * kept in the cache. 1042 * kept in the cache.
1043 */ 1043 */
1044 int get cacheSize; 1044 int get cacheSize;
1045 1045
1046 /** 1046 /**
1047 * Return `true` if analysis is to generate dart2js related hint results. 1047 * Return `true` if analysis is to generate dart2js related hint results.
1048 */ 1048 */
1049 bool get dart2jsHint; 1049 bool get dart2jsHint;
1050 1050
1051 /** 1051 /**
1052 * Return `true` if the parser is to parse asserts in the initializer list of
1053 * a constructor.
1054 */
1055 bool get enableAssertInitializer;
1056
1057 /**
1052 * Return `true` to enable custom assert messages (DEP 37). 1058 * Return `true` to enable custom assert messages (DEP 37).
1053 */ 1059 */
1054 bool get enableAssertMessage; 1060 bool get enableAssertMessage;
1055 1061
1056 /** 1062 /**
1057 * Return `true` to if analysis is to enable async support. 1063 * Return `true` to if analysis is to enable async support.
1058 */ 1064 */
1059 bool get enableAsync; 1065 bool get enableAsync;
1060 1066
1061 /** 1067 /**
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 */ 1201 */
1196 static const List<String> NONNULLABLE_TYPES = const <String>[]; 1202 static const List<String> NONNULLABLE_TYPES = const <String>[];
1197 1203
1198 /** 1204 /**
1199 * A predicate indicating whether analysis is to parse and analyze function 1205 * A predicate indicating whether analysis is to parse and analyze function
1200 * bodies. 1206 * bodies.
1201 */ 1207 */
1202 AnalyzeFunctionBodiesPredicate _analyzeFunctionBodiesPredicate = 1208 AnalyzeFunctionBodiesPredicate _analyzeFunctionBodiesPredicate =
1203 _analyzeAllFunctionBodies; 1209 _analyzeAllFunctionBodies;
1204 1210
1205 /** 1211 @override
1206 * The maximum number of sources for which AST structures should be kept in
1207 * the cache.
1208 */
1209 int cacheSize = DEFAULT_CACHE_SIZE; 1212 int cacheSize = DEFAULT_CACHE_SIZE;
1210 1213
1211 /** 1214 @override
1212 * A flag indicating whether analysis is to generate dart2js related hint
1213 * results.
1214 */
1215 bool dart2jsHint = false; 1215 bool dart2jsHint = false;
1216 1216
1217 /** 1217 @override
1218 * A flag indicating whether custom assert messages are to be supported (DEP 1218 bool enableAssertInitializer = false;
1219 * 37). 1219
1220 */ 1220 @override
1221 bool enableAssertMessage = false; 1221 bool enableAssertMessage = false;
1222 1222
1223 /** 1223 @override
1224 * A flag indicating whether analysis is to enable async support.
1225 */
1226 bool enableAsync = true; 1224 bool enableAsync = true;
1227 1225
1228 /** 1226 @override
1229 * A flag indicating whether generic methods are to be supported (DEP 22).
1230 */
1231 bool enableGenericMethods = false; 1227 bool enableGenericMethods = false;
1232 1228
1233 @override 1229 @override
1234 bool enableLazyAssignmentOperators = false; 1230 bool enableLazyAssignmentOperators = false;
1235 1231
1236 /** 1232 @override
1237 * A flag indicating whether analysis is to strictly follow the specification
1238 * when generating warnings on "call" methods (fixes dartbug.com/21938).
1239 */
1240 bool enableStrictCallChecks = false; 1233 bool enableStrictCallChecks = false;
1241 1234
1242 /** 1235 @override
1243 * A flag indicating whether mixins are allowed to inherit from types other
1244 * than Object, and are allowed to reference `super`.
1245 */
1246 bool enableSuperMixins = false; 1236 bool enableSuperMixins = false;
1247 1237
1248 @override 1238 @override
1249 bool enableTiming = false; 1239 bool enableTiming = false;
1250 1240
1251 /** 1241 @override
1252 * A flag indicating whether errors, warnings and hints should be generated
1253 * for sources that are implicitly being analyzed.
1254 */
1255 bool generateImplicitErrors = true; 1242 bool generateImplicitErrors = true;
1256 1243
1257 /** 1244 @override
1258 * A flag indicating whether errors, warnings and hints should be generated
1259 * for sources in the SDK.
1260 */
1261 bool generateSdkErrors = false; 1245 bool generateSdkErrors = false;
1262 1246
1263 /** 1247 @override
1264 * A flag indicating whether analysis is to generate hint results (e.g. type
1265 * inference based information and pub best practices).
1266 */
1267 bool hint = true; 1248 bool hint = true;
1268 1249
1269 /** 1250 @override
1270 * A flag indicating whether incremental analysis should be used.
1271 */
1272 bool incremental = false; 1251 bool incremental = false;
1273 1252
1274 /** 1253 @override
1275 * A flag indicating whether incremental analysis should be used for API
1276 * changes.
1277 */
1278 bool incrementalApi = false; 1254 bool incrementalApi = false;
1279 1255
1280 /** 1256 @override
1281 * A flag indicating whether validation should be performed after incremental
1282 * analysis.
1283 */
1284 bool incrementalValidation = false; 1257 bool incrementalValidation = false;
1285 1258
1286 /** 1259 @override
1287 * A flag indicating whether analysis is to generate lint warnings.
1288 */
1289 bool lint = false; 1260 bool lint = false;
1290 1261
1291 /** 1262 @override
1292 * A flag indicating whether analysis is to parse comments.
1293 */
1294 bool preserveComments = true; 1263 bool preserveComments = true;
1295 1264
1296 /** 1265 @override
1297 * A flag indicating whether strong-mode analysis should be used.
1298 */
1299 bool strongMode = false; 1266 bool strongMode = false;
1300 1267
1301 /** 1268 /**
1302 * A flag indicating whether strong-mode inference hints should be 1269 * A flag indicating whether strong-mode inference hints should be
1303 * used. This flag is not exposed in the interface, and should be 1270 * used. This flag is not exposed in the interface, and should be
1304 * replaced by something more general. 1271 * replaced by something more general.
1305 */ 1272 */
1306 // TODO(leafp): replace this with something more general 1273 // TODO(leafp): replace this with something more general
1307 bool strongModeHints = false; 1274 bool strongModeHints = false;
1308 1275
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 AnalysisOptionsImpl(); 1312 AnalysisOptionsImpl();
1346 1313
1347 /** 1314 /**
1348 * Initialize a newly created set of analysis options to have the same values 1315 * Initialize a newly created set of analysis options to have the same values
1349 * as those in the given set of analysis [options]. 1316 * as those in the given set of analysis [options].
1350 */ 1317 */
1351 AnalysisOptionsImpl.from(AnalysisOptions options) { 1318 AnalysisOptionsImpl.from(AnalysisOptions options) {
1352 analyzeFunctionBodiesPredicate = options.analyzeFunctionBodiesPredicate; 1319 analyzeFunctionBodiesPredicate = options.analyzeFunctionBodiesPredicate;
1353 cacheSize = options.cacheSize; 1320 cacheSize = options.cacheSize;
1354 dart2jsHint = options.dart2jsHint; 1321 dart2jsHint = options.dart2jsHint;
1322 enableAssertInitializer = options.enableAssertInitializer;
1355 enableAssertMessage = options.enableAssertMessage; 1323 enableAssertMessage = options.enableAssertMessage;
1356 enableAsync = options.enableAsync; 1324 enableAsync = options.enableAsync;
1357 enableStrictCallChecks = options.enableStrictCallChecks; 1325 enableStrictCallChecks = options.enableStrictCallChecks;
1358 enableGenericMethods = options.enableGenericMethods; 1326 enableGenericMethods = options.enableGenericMethods;
1359 enableSuperMixins = options.enableSuperMixins; 1327 enableSuperMixins = options.enableSuperMixins;
1360 enableTiming = options.enableTiming; 1328 enableTiming = options.enableTiming;
1361 generateImplicitErrors = options.generateImplicitErrors; 1329 generateImplicitErrors = options.generateImplicitErrors;
1362 generateSdkErrors = options.generateSdkErrors; 1330 generateSdkErrors = options.generateSdkErrors;
1363 hint = options.hint; 1331 hint = options.hint;
1364 incremental = options.incremental; 1332 incremental = options.incremental;
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after
2733 * The data that was created from the source. 2701 * The data that was created from the source.
2734 */ 2702 */
2735 final E data; 2703 final E data;
2736 2704
2737 /** 2705 /**
2738 * Initialize a newly created holder to associate the given [data] with the 2706 * Initialize a newly created holder to associate the given [data] with the
2739 * given [modificationTime]. 2707 * given [modificationTime].
2740 */ 2708 */
2741 TimestampedData(this.modificationTime, this.data); 2709 TimestampedData(this.modificationTime, this.data);
2742 } 2710 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698