| OLD | NEW |
| 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.task.dart; | 5 library analyzer.task.dart; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
| 8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
| 9 import 'package:analyzer/src/generated/error.dart'; | 9 import 'package:analyzer/src/generated/error.dart'; |
| 10 import 'package:analyzer/src/generated/scanner.dart'; | 10 import 'package:analyzer/src/generated/scanner.dart'; |
| 11 import 'package:analyzer/src/generated/source.dart'; | 11 import 'package:analyzer/src/generated/source.dart'; |
| 12 import 'package:analyzer/task/general.dart'; | 12 import 'package:analyzer/task/general.dart'; |
| 13 import 'package:analyzer/task/model.dart'; | 13 import 'package:analyzer/task/model.dart'; |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * The errors produced while builing a library element. |
| 17 * |
| 18 * The list will be empty if there were no errors, but will not be `null`. |
| 19 * |
| 20 * The result is only available for targets representing a Dart library. |
| 21 */ |
| 22 final ResultDescriptor<List<AnalysisError>> BUILD_LIBRARY_ERRORS = |
| 23 new ResultDescriptor<List<AnalysisError>>( |
| 24 'BUILD_LIBRARY_ERRORS', AnalysisError.NO_ERRORS, |
| 25 contributesTo: ANALYSIS_ERRORS); |
| 26 |
| 27 /** |
| 28 * The partial [LibraryElement] associated with a library. |
| 29 * |
| 30 * The [LibraryElement] and its [CompilationUnitElement]s are attached to each |
| 31 * other. Directives 'library', 'part' and 'part of' are resolved. |
| 32 * |
| 33 * The result is only available for targets representing a Dart library. |
| 34 */ |
| 35 final ResultDescriptor<LibraryElement> BUILT_LIBRARY_ELEMENT = |
| 36 new ResultDescriptor<LibraryElement>('BUILT_LIBRARY_ELEMENT', null); |
| 37 |
| 38 /** |
| 16 * The compilation unit associated with a [Source] after it has had all | 39 * The compilation unit associated with a [Source] after it has had all |
| 17 * declarations bound to the element defined by the declaration. | 40 * declarations bound to the element defined by the declaration. |
| 18 * | 41 * |
| 19 * The result is only available for targets representing a Dart compilation unit
. | 42 * The result is only available for targets representing a Dart compilation unit
. |
| 20 */ | 43 */ |
| 21 final ResultDescriptor<CompilationUnit> BUILT_UNIT = | 44 final ResultDescriptor<CompilationUnit> BUILT_UNIT = |
| 22 new ResultDescriptor<CompilationUnit>('BUILT_UNIT', null); | 45 new ResultDescriptor<CompilationUnit>('BUILT_UNIT', null); |
| 23 | 46 |
| 24 /** | 47 /** |
| 25 * The element model associated with a single compilation unit. | 48 * The element model associated with a single compilation unit. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 36 * The list will be empty if there are no exported libraries, but will not be | 59 * The list will be empty if there are no exported libraries, but will not be |
| 37 * `null`. | 60 * `null`. |
| 38 * | 61 * |
| 39 * The result is only available for targets representing a Dart library. | 62 * The result is only available for targets representing a Dart library. |
| 40 */ | 63 */ |
| 41 final ResultDescriptor<List<Source>> EXPORTED_LIBRARIES = | 64 final ResultDescriptor<List<Source>> EXPORTED_LIBRARIES = |
| 42 new ResultDescriptor<List<Source>>( | 65 new ResultDescriptor<List<Source>>( |
| 43 'EXPORTED_LIBRARIES', Source.EMPTY_ARRAY); | 66 'EXPORTED_LIBRARIES', Source.EMPTY_ARRAY); |
| 44 | 67 |
| 45 /** | 68 /** |
| 69 * A flag specifying whether a library imports 'dart:html'. |
| 70 * |
| 71 * The result is only available for targets representing a Dart library. |
| 72 */ |
| 73 final ResultDescriptor<bool> HAS_HTML_IMPORT = |
| 74 new ResultDescriptor<bool>('HAS_HTML_IMPORT', false); |
| 75 |
| 76 /** |
| 46 * The sources of the libraries that are imported into a library. | 77 * The sources of the libraries that are imported into a library. |
| 47 * | 78 * |
| 48 * The list will be empty if there are no imported libraries, but will not be | 79 * The list will be empty if there are no imported libraries, but will not be |
| 49 * `null`. | 80 * `null`. |
| 50 * | 81 * |
| 51 * The result is only available for targets representing a Dart library. | 82 * The result is only available for targets representing a Dart library. |
| 52 */ | 83 */ |
| 53 final ResultDescriptor<List<Source>> IMPORTED_LIBRARIES = | 84 final ResultDescriptor<List<Source>> IMPORTED_LIBRARIES = |
| 54 new ResultDescriptor<List<Source>>( | 85 new ResultDescriptor<List<Source>>( |
| 55 'IMPORTED_LIBRARIES', Source.EMPTY_ARRAY); | 86 'IMPORTED_LIBRARIES', Source.EMPTY_ARRAY); |
| 56 | 87 |
| 57 /** | 88 /** |
| 58 * The sources of the parts that are included in a library. | 89 * The sources of the parts that are included in a library. |
| 59 * | 90 * |
| 60 * The list will be empty if there are no parts, but will not be `null`. The | 91 * The list will be empty if there are no parts, but will not be `null`. The |
| 61 * list does *not* include the source for the defining compilation unit. | 92 * list does *not* include the source for the defining compilation unit. |
| 62 * | 93 * |
| 63 * The result is only available for targets representing a Dart library. | 94 * The result is only available for targets representing a Dart library. |
| 64 */ | 95 */ |
| 65 final ResultDescriptor<List<Source>> INCLUDED_PARTS = | 96 final ResultDescriptor<List<Source>> INCLUDED_PARTS = |
| 66 new ResultDescriptor<List<Source>>('INCLUDED_PARTS', Source.EMPTY_ARRAY); | 97 new ResultDescriptor<List<Source>>('INCLUDED_PARTS', Source.EMPTY_ARRAY); |
| 67 | 98 |
| 68 /** | 99 /** |
| 100 * A flag specifying whether a library is launchable. |
| 101 * |
| 102 * The result is only available for targets representing a Dart library. |
| 103 */ |
| 104 final ResultDescriptor<bool> IS_LAUNCHABLE = |
| 105 new ResultDescriptor<bool>('IS_LAUNCHABLE', false); |
| 106 |
| 107 /** |
| 69 * The errors produced while parsing a compilation unit. | 108 * The errors produced while parsing a compilation unit. |
| 70 * | 109 * |
| 71 * The list will be empty if there were no errors, but will not be `null`. | 110 * The list will be empty if there were no errors, but will not be `null`. |
| 72 * | 111 * |
| 73 * The result is only available for targets representing a Dart compilation unit
. | 112 * The result is only available for targets representing a Dart compilation unit
. |
| 74 */ | 113 */ |
| 75 final ResultDescriptor<List<AnalysisError>> PARSE_ERRORS = | 114 final ResultDescriptor<List<AnalysisError>> PARSE_ERRORS = |
| 76 new ResultDescriptor<List<AnalysisError>>( | 115 new ResultDescriptor<List<AnalysisError>>( |
| 77 'PARSE_ERRORS', AnalysisError.NO_ERRORS, | 116 'PARSE_ERRORS', AnalysisError.NO_ERRORS, |
| 78 contributesTo: ANALYSIS_ERRORS); | 117 contributesTo: ANALYSIS_ERRORS); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 101 /** | 140 /** |
| 102 * The token stream produced while scanning a compilation unit. | 141 * The token stream produced while scanning a compilation unit. |
| 103 * | 142 * |
| 104 * The value is the first token in the file, or the special end-of-file marker | 143 * The value is the first token in the file, or the special end-of-file marker |
| 105 * at the end of the stream if the file does not contain any tokens. | 144 * at the end of the stream if the file does not contain any tokens. |
| 106 * | 145 * |
| 107 * The result is only available for targets representing a Dart compilation unit
. | 146 * The result is only available for targets representing a Dart compilation unit
. |
| 108 */ | 147 */ |
| 109 final ResultDescriptor<Token> TOKEN_STREAM = | 148 final ResultDescriptor<Token> TOKEN_STREAM = |
| 110 new ResultDescriptor<Token>('TOKEN_STREAM', null); | 149 new ResultDescriptor<Token>('TOKEN_STREAM', null); |
| OLD | NEW |