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

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

Issue 1933763002: Use null-aware operators to clean up the code (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Additional clean-up Created 4 years, 7 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) 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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 * Return the logger that should receive information about errors within the 809 * Return the logger that should receive information about errors within the
810 * analysis engine. 810 * analysis engine.
811 */ 811 */
812 Logger get logger => _logger; 812 Logger get logger => _logger;
813 813
814 /** 814 /**
815 * Set the logger that should receive information about errors within the 815 * Set the logger that should receive information about errors within the
816 * analysis engine to the given [logger]. 816 * analysis engine to the given [logger].
817 */ 817 */
818 void set logger(Logger logger) { 818 void set logger(Logger logger) {
819 this._logger = logger == null ? Logger.NULL : logger; 819 this._logger = logger ?? Logger.NULL;
820 } 820 }
821 821
822 /** 822 /**
823 * Return the list of plugins that clients are required to process, either by 823 * Return the list of plugins that clients are required to process, either by
824 * creating an [ExtensionManager] or by using the method 824 * creating an [ExtensionManager] or by using the method
825 * [processRequiredPlugins]. 825 * [processRequiredPlugins].
826 */ 826 */
827 List<Plugin> get requiredPlugins => <Plugin>[enginePlugin]; 827 List<Plugin> get requiredPlugins => <Plugin>[enginePlugin];
828 828
829 /** 829 /**
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 * 37). 1193 * 37).
1194 */ 1194 */
1195 bool enableAssertMessage = false; 1195 bool enableAssertMessage = false;
1196 1196
1197 /** 1197 /**
1198 * A flag indicating whether analysis is to enable async support. 1198 * A flag indicating whether analysis is to enable async support.
1199 */ 1199 */
1200 bool enableAsync = true; 1200 bool enableAsync = true;
1201 1201
1202 /** 1202 /**
1203 * A flag indicating whether interface libraries are to be supported (DEP 40).
1204 */
1205 bool get enableConditionalDirectives => true;
1206
1207 @deprecated
1208 void set enableConditionalDirectives(_) {}
1209
1210 /**
1211 * A flag indicating whether generic methods are to be supported (DEP 22). 1203 * A flag indicating whether generic methods are to be supported (DEP 22).
1212 */ 1204 */
1213 bool enableGenericMethods = false; 1205 bool enableGenericMethods = false;
1214 1206
1215 /** 1207 /**
1216 * A flag indicating whether analysis is to strictly follow the specification 1208 * A flag indicating whether analysis is to strictly follow the specification
1217 * when generating warnings on "call" methods (fixes dartbug.com/21938). 1209 * when generating warnings on "call" methods (fixes dartbug.com/21938).
1218 */ 1210 */
1219 bool enableStrictCallChecks = false; 1211 bool enableStrictCallChecks = false;
1220 1212
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 AnalyzeFunctionBodiesPredicate get analyzeFunctionBodiesPredicate => 1334 AnalyzeFunctionBodiesPredicate get analyzeFunctionBodiesPredicate =>
1343 _analyzeFunctionBodiesPredicate; 1335 _analyzeFunctionBodiesPredicate;
1344 1336
1345 set analyzeFunctionBodiesPredicate(AnalyzeFunctionBodiesPredicate value) { 1337 set analyzeFunctionBodiesPredicate(AnalyzeFunctionBodiesPredicate value) {
1346 if (value == null) { 1338 if (value == null) {
1347 throw new ArgumentError.notNull('analyzeFunctionBodiesPredicate'); 1339 throw new ArgumentError.notNull('analyzeFunctionBodiesPredicate');
1348 } 1340 }
1349 _analyzeFunctionBodiesPredicate = value; 1341 _analyzeFunctionBodiesPredicate = value;
1350 } 1342 }
1351 1343
1344 /**
1345 * A flag indicating whether interface libraries are to be supported (DEP 40).
1346 */
1347 bool get enableConditionalDirectives => true;
1348
1349 @deprecated
1350 void set enableConditionalDirectives(_) {}
1351
1352 @override 1352 @override
1353 int encodeCrossContextOptions() => 1353 int encodeCrossContextOptions() =>
1354 (enableAssertMessage ? ENABLE_ASSERT_FLAG : 0) | 1354 (enableAssertMessage ? ENABLE_ASSERT_FLAG : 0) |
1355 (enableAsync ? ENABLE_ASYNC_FLAG : 0) | 1355 (enableAsync ? ENABLE_ASYNC_FLAG : 0) |
1356 (enableGenericMethods ? ENABLE_GENERIC_METHODS_FLAG : 0) | 1356 (enableGenericMethods ? ENABLE_GENERIC_METHODS_FLAG : 0) |
1357 (enableStrictCallChecks ? ENABLE_STRICT_CALL_CHECKS_FLAG : 0) | 1357 (enableStrictCallChecks ? ENABLE_STRICT_CALL_CHECKS_FLAG : 0) |
1358 (strongMode ? ENABLE_STRONG_MODE_FLAG : 0) | 1358 (strongMode ? ENABLE_STRONG_MODE_FLAG : 0) |
1359 (strongModeHints ? ENABLE_STRONG_MODE_HINTS_FLAG : 0) | 1359 (strongModeHints ? ENABLE_STRONG_MODE_HINTS_FLAG : 0) |
1360 (enableSuperMixins ? ENABLE_SUPER_MIXINS_FLAG : 0); 1360 (enableSuperMixins ? ENABLE_SUPER_MIXINS_FLAG : 0);
1361 1361
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
2551 * The data that was created from the source. 2551 * The data that was created from the source.
2552 */ 2552 */
2553 final E data; 2553 final E data;
2554 2554
2555 /** 2555 /**
2556 * Initialize a newly created holder to associate the given [data] with the 2556 * Initialize a newly created holder to associate the given [data] with the
2557 * given [modificationTime]. 2557 * given [modificationTime].
2558 */ 2558 */
2559 TimestampedData(this.modificationTime, this.data); 2559 TimestampedData(this.modificationTime, this.data);
2560 } 2560 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/element_resolver.dart ('k') | pkg/analyzer/lib/src/generated/error.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698