| 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/error.dart'; | 9 import 'package:analyzer/src/generated/error.dart'; |
| 9 import 'package:analyzer/src/generated/scanner.dart'; | 10 import 'package:analyzer/src/generated/scanner.dart'; |
| 10 import 'package:analyzer/src/generated/source.dart'; | 11 import 'package:analyzer/src/generated/source.dart'; |
| 11 import 'package:analyzer/task/general.dart'; | 12 import 'package:analyzer/task/general.dart'; |
| 12 import 'package:analyzer/task/model.dart'; | 13 import 'package:analyzer/task/model.dart'; |
| 13 | 14 |
| 14 /** | 15 /** |
| 16 * The compilation unit associated with a [Source] after it has had all |
| 17 * declarations bound to the element defined by the declaration. |
| 18 * |
| 19 * The result is only available for targets representing a Dart compilation unit
. |
| 20 */ |
| 21 final ResultDescriptor<CompilationUnit> BUILT_UNIT = |
| 22 new ResultDescriptor<CompilationUnit>('BUILT_UNIT', null); |
| 23 |
| 24 /** |
| 25 * The element model associated with a single compilation unit. |
| 26 * |
| 27 * The result is only available for targets representing a Dart compilation unit
. |
| 28 */ |
| 29 final ResultDescriptor<CompilationUnitElement> COMPILATION_UNIT_ELEMENT = |
| 30 new ResultDescriptor<CompilationUnitElement>('COMPILATION_UNIT_ELEMENT', nul
l); |
| 31 |
| 32 /** |
| 15 * The sources of the libraries that are exported from a library. | 33 * The sources of the libraries that are exported from a library. |
| 16 * | 34 * |
| 17 * The list will be empty if there are no exported libraries, but will not be | 35 * The list will be empty if there are no exported libraries, but will not be |
| 18 * `null`. | 36 * `null`. |
| 19 * | 37 * |
| 20 * The result is only available for targets representing a Dart library. | 38 * The result is only available for targets representing a Dart library. |
| 21 */ | 39 */ |
| 22 final ResultDescriptor<List<Source>> EXPORTED_LIBRARIES = | 40 final ResultDescriptor<List<Source>> EXPORTED_LIBRARIES = |
| 23 new ResultDescriptor<List<Source>>('EXPORTED_LIBRARIES'); | 41 new ResultDescriptor<List<Source>>('EXPORTED_LIBRARIES', Source.EMPTY_ARRAY)
; |
| 24 | 42 |
| 25 /** | 43 /** |
| 26 * The sources of the libraries that are imported into a library. | 44 * The sources of the libraries that are imported into a library. |
| 27 * | 45 * |
| 28 * The list will be empty if there are no imported libraries, but will not be | 46 * The list will be empty if there are no imported libraries, but will not be |
| 29 * `null`. | 47 * `null`. |
| 30 * | 48 * |
| 31 * The result is only available for targets representing a Dart library. | 49 * The result is only available for targets representing a Dart library. |
| 32 */ | 50 */ |
| 33 final ResultDescriptor<List<Source>> IMPORTED_LIBRARIES = | 51 final ResultDescriptor<List<Source>> IMPORTED_LIBRARIES = |
| 34 new ResultDescriptor<List<Source>>('IMPORTED_LIBRARIES'); | 52 new ResultDescriptor<List<Source>>('IMPORTED_LIBRARIES', Source.EMPTY_ARRAY)
; |
| 35 | 53 |
| 36 /** | 54 /** |
| 37 * The sources of the parts that are included in a library. | 55 * The sources of the parts that are included in a library. |
| 38 * | 56 * |
| 39 * The list will be empty if there are no parts, but will not be `null`. The | 57 * The list will be empty if there are no parts, but will not be `null`. The |
| 40 * list does *not* include the source for the defining compilation unit. | 58 * list does *not* include the source for the defining compilation unit. |
| 41 * | 59 * |
| 42 * The result is only available for targets representing a Dart library. | 60 * The result is only available for targets representing a Dart library. |
| 43 */ | 61 */ |
| 44 final ResultDescriptor<List<Source>> INCLUDED_PARTS = | 62 final ResultDescriptor<List<Source>> INCLUDED_PARTS = |
| 45 new ResultDescriptor<List<Source>>('INCLUDED_PARTS'); | 63 new ResultDescriptor<List<Source>>('INCLUDED_PARTS', Source.EMPTY_ARRAY); |
| 46 | 64 |
| 47 /** | 65 /** |
| 48 * The errors produced while parsing a compilation unit. | 66 * The errors produced while parsing a compilation unit. |
| 49 * | 67 * |
| 50 * The list will be empty if there were no errors, but will not be `null`. | 68 * The list will be empty if there were no errors, but will not be `null`. |
| 51 * | 69 * |
| 52 * The result is only available for targets representing a Dart compilation unit
. | 70 * The result is only available for targets representing a Dart compilation unit
. |
| 53 */ | 71 */ |
| 54 final ResultDescriptor<List<AnalysisError>> PARSE_ERRORS = | 72 final ResultDescriptor<List<AnalysisError>> PARSE_ERRORS = |
| 55 new ResultDescriptor<List<AnalysisError>>( | 73 new ResultDescriptor<List<AnalysisError>>( |
| 56 'PARSE_ERRORS', | 74 'PARSE_ERRORS', |
| 75 AnalysisError.NO_ERRORS, |
| 57 contributesTo: ANALYSIS_ERRORS); | 76 contributesTo: ANALYSIS_ERRORS); |
| 58 | 77 |
| 59 /** | 78 /** |
| 60 * The compilation unit AST produced while parsing a compilation unit. | 79 * The compilation unit AST produced while parsing a compilation unit. |
| 61 * | 80 * |
| 62 * The AST structure will not have resolution information associated with it. | 81 * The AST structure will not have resolution information associated with it. |
| 63 * | 82 * |
| 64 * The result is only available for targets representing a Dart compilation unit
. | 83 * The result is only available for targets representing a Dart compilation unit
. |
| 65 */ | 84 */ |
| 66 final ResultDescriptor<CompilationUnit> PARSED_UNIT = | 85 final ResultDescriptor<CompilationUnit> PARSED_UNIT = |
| 67 new ResultDescriptor<CompilationUnit>('PARSED_UNIT'); | 86 new ResultDescriptor<CompilationUnit>('PARSED_UNIT', null); |
| 68 | 87 |
| 69 /** | 88 /** |
| 70 * The errors produced while scanning a compilation unit. | 89 * The errors produced while scanning a compilation unit. |
| 71 * | 90 * |
| 72 * The list will be empty if there were no errors, but will not be `null`. | 91 * The list will be empty if there were no errors, but will not be `null`. |
| 73 * | 92 * |
| 74 * The result is only available for targets representing a Dart compilation unit
. | 93 * The result is only available for targets representing a Dart compilation unit
. |
| 75 */ | 94 */ |
| 76 final ResultDescriptor<List<AnalysisError>> SCAN_ERRORS = | 95 final ResultDescriptor<List<AnalysisError>> SCAN_ERRORS = |
| 77 new ResultDescriptor<List<AnalysisError>>( | 96 new ResultDescriptor<List<AnalysisError>>( |
| 78 'SCAN_ERRORS', | 97 'SCAN_ERRORS', |
| 98 AnalysisError.NO_ERRORS, |
| 79 contributesTo: ANALYSIS_ERRORS); | 99 contributesTo: ANALYSIS_ERRORS); |
| 80 | 100 |
| 81 /** | 101 /** |
| 82 * The token stream produced while scanning a compilation unit. | 102 * The token stream produced while scanning a compilation unit. |
| 83 * | 103 * |
| 84 * The value is the first token in the file, or the special end-of-file marker | 104 * The value is the first token in the file, or the special end-of-file marker |
| 85 * at the end of the stream if the file does not contain any tokens. | 105 * at the end of the stream if the file does not contain any tokens. |
| 86 * | 106 * |
| 87 * The result is only available for targets representing a Dart compilation unit
. | 107 * The result is only available for targets representing a Dart compilation unit
. |
| 88 */ | 108 */ |
| 89 final ResultDescriptor<Token> TOKEN_STREAM = | 109 final ResultDescriptor<Token> TOKEN_STREAM = |
| 90 new ResultDescriptor<Token>('TOKEN_STREAM'); | 110 new ResultDescriptor<Token>('TOKEN_STREAM', null); |
| OLD | NEW |