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

Side by Side Diff: pkg/analyzer/lib/task/dart.dart

Issue 1012993002: Rename ContributionPoint and error result (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
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.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/resolver.dart'; 10 import 'package:analyzer/src/generated/resolver.dart';
11 import 'package:analyzer/src/generated/scanner.dart'; 11 import 'package:analyzer/src/generated/scanner.dart';
12 import 'package:analyzer/src/generated/source.dart'; 12 import 'package:analyzer/src/generated/source.dart';
13 import 'package:analyzer/task/general.dart';
14 import 'package:analyzer/task/model.dart'; 13 import 'package:analyzer/task/model.dart';
15 14
16 /** 15 /**
17 * The element model associated with a single compilation unit. 16 * The element model associated with a single compilation unit.
18 * 17 *
19 * The result is only available for targets representing a Dart compilation unit . 18 * The result is only available for targets representing a Dart compilation unit .
20 */ 19 */
21 final ResultDescriptor<CompilationUnitElement> COMPILATION_UNIT_ELEMENT = 20 final ResultDescriptor<CompilationUnitElement> COMPILATION_UNIT_ELEMENT =
22 new ResultDescriptor<CompilationUnitElement>( 21 new ResultDescriptor<CompilationUnitElement>(
23 'COMPILATION_UNIT_ELEMENT', null); 22 'COMPILATION_UNIT_ELEMENT', null);
24 23
25 /** 24 /**
25 * The analysis errors associated with a target.
26 *
27 * The value combines errors represented by multiple other results.
28 */
29 // TODO(brianwilkerson) If we want to associate errors with targets smaller than
30 // a file, we will need other contribution points to collect them. In which case
31 // we might want to rename this and/or document that it applies to files.
32 final CompositeResultDescriptor<List<AnalysisError>> DART_ERRORS =
33 new CompositeResultDescriptor<List<AnalysisError>>('DART_ERRORS');
34
35 /**
26 * The sources of the libraries that are exported from a library. 36 * The sources of the libraries that are exported from a library.
27 * 37 *
28 * The list will be empty if there are no exported libraries, but will not be 38 * The list will be empty if there are no exported libraries, but will not be
29 * `null`. 39 * `null`.
30 * 40 *
31 * The result is only available for targets representing a Dart library. 41 * The result is only available for targets representing a Dart library.
32 */ 42 */
33 final ResultDescriptor<List<Source>> EXPORTED_LIBRARIES = 43 final ResultDescriptor<List<Source>> EXPORTED_LIBRARIES =
34 new ResultDescriptor<List<Source>>( 44 new ResultDescriptor<List<Source>>(
35 'EXPORTED_LIBRARIES', Source.EMPTY_ARRAY); 45 'EXPORTED_LIBRARIES', Source.EMPTY_ARRAY);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 86
77 /** 87 /**
78 * The errors produced while parsing a compilation unit. 88 * The errors produced while parsing a compilation unit.
79 * 89 *
80 * The list will be empty if there were no errors, but will not be `null`. 90 * The list will be empty if there were no errors, but will not be `null`.
81 * 91 *
82 * The result is only available for targets representing a Dart compilation unit . 92 * The result is only available for targets representing a Dart compilation unit .
83 */ 93 */
84 final ResultDescriptor<List<AnalysisError>> PARSE_ERRORS = 94 final ResultDescriptor<List<AnalysisError>> PARSE_ERRORS =
85 new ResultDescriptor<List<AnalysisError>>( 95 new ResultDescriptor<List<AnalysisError>>(
86 'PARSE_ERRORS', AnalysisError.NO_ERRORS, 96 'PARSE_ERRORS', AnalysisError.NO_ERRORS, contributesTo: DART_ERRORS);
87 contributesTo: ANALYSIS_ERRORS);
88 97
89 /** 98 /**
90 * The compilation unit AST produced while parsing a compilation unit. 99 * The compilation unit AST produced while parsing a compilation unit.
91 * 100 *
92 * The AST structure will not have resolution information associated with it. 101 * The AST structure will not have resolution information associated with it.
93 * 102 *
94 * The result is only available for targets representing a Dart compilation unit . 103 * The result is only available for targets representing a Dart compilation unit .
95 */ 104 */
96 final ResultDescriptor<CompilationUnit> PARSED_UNIT = 105 final ResultDescriptor<CompilationUnit> PARSED_UNIT =
97 new ResultDescriptor<CompilationUnit>('PARSED_UNIT', null); 106 new ResultDescriptor<CompilationUnit>('PARSED_UNIT', null);
98 107
99 /** 108 /**
100 * The public [Namespace] of a library. 109 * The public [Namespace] of a library.
101 * 110 *
102 * The result is only available for targets representing a Dart library. 111 * The result is only available for targets representing a Dart library.
103 */ 112 */
104 final ResultDescriptor<Namespace> PUBLIC_NAMESPACE = 113 final ResultDescriptor<Namespace> PUBLIC_NAMESPACE =
105 new ResultDescriptor<Namespace>('PUBLIC_NAMESPACE', null); 114 new ResultDescriptor<Namespace>('PUBLIC_NAMESPACE', null);
106 115
107 /** 116 /**
108 * The errors produced while scanning a compilation unit. 117 * The errors produced while scanning a compilation unit.
109 * 118 *
110 * The list will be empty if there were no errors, but will not be `null`. 119 * The list will be empty if there were no errors, but will not be `null`.
111 * 120 *
112 * The result is only available for targets representing a Dart compilation unit . 121 * The result is only available for targets representing a Dart compilation unit .
113 */ 122 */
114 final ResultDescriptor<List<AnalysisError>> SCAN_ERRORS = 123 final ResultDescriptor<List<AnalysisError>> SCAN_ERRORS =
115 new ResultDescriptor<List<AnalysisError>>( 124 new ResultDescriptor<List<AnalysisError>>(
116 'SCAN_ERRORS', AnalysisError.NO_ERRORS, contributesTo: ANALYSIS_ERRORS); 125 'SCAN_ERRORS', AnalysisError.NO_ERRORS, contributesTo: DART_ERRORS);
117 126
118 /** 127 /**
119 * The token stream produced while scanning a compilation unit. 128 * The token stream produced while scanning a compilation unit.
120 * 129 *
121 * The value is the first token in the file, or the special end-of-file marker 130 * The value is the first token in the file, or the special end-of-file marker
122 * at the end of the stream if the file does not contain any tokens. 131 * at the end of the stream if the file does not contain any tokens.
123 * 132 *
124 * The result is only available for targets representing a Dart compilation unit . 133 * The result is only available for targets representing a Dart compilation unit .
125 */ 134 */
126 final ResultDescriptor<Token> TOKEN_STREAM = 135 final ResultDescriptor<Token> TOKEN_STREAM =
127 new ResultDescriptor<Token>('TOKEN_STREAM', null); 136 new ResultDescriptor<Token>('TOKEN_STREAM', null);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698