OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.task.yaml; | 5 library analyzer.src.task.yaml; |
6 | 6 |
7 import 'package:analyzer/src/context/cache.dart'; | 7 import 'package:analyzer/src/context/cache.dart'; |
8 import 'package:analyzer/src/dart/scanner/scanner.dart'; | 8 import 'package:analyzer/src/dart/scanner/scanner.dart'; |
9 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask; | 9 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask; |
10 import 'package:analyzer/src/generated/error.dart'; | 10 import 'package:analyzer/src/generated/error.dart'; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 outputs[YAML_ERRORS] = errors; | 93 outputs[YAML_ERRORS] = errors; |
94 outputs[LINE_INFO] = new LineInfo.fromContent(content); | 94 outputs[LINE_INFO] = new LineInfo.fromContent(content); |
95 } | 95 } |
96 } | 96 } |
97 | 97 |
98 /** | 98 /** |
99 * Return a map from the names of the inputs of this kind of task to the task | 99 * Return a map from the names of the inputs of this kind of task to the task |
100 * input descriptors describing those inputs for a task with the given | 100 * input descriptors describing those inputs for a task with the given |
101 * [source]. | 101 * [source]. |
102 */ | 102 */ |
103 static Map<String, TaskInput> buildInputs(Source source) { | 103 static Map<String, TaskInput> buildInputs(AnalysisTarget source) { |
104 return <String, TaskInput>{CONTENT_INPUT_NAME: CONTENT.of(source)}; | 104 return <String, TaskInput>{CONTENT_INPUT_NAME: CONTENT.of(source)}; |
105 } | 105 } |
106 | 106 |
107 /** | 107 /** |
108 * Create a [ParseYamlTask] based on the given [target] in the given [context]
. | 108 * Create a [ParseYamlTask] based on the given [target] in the given [context]
. |
109 */ | 109 */ |
110 static ParseYamlTask createTask( | 110 static ParseYamlTask createTask( |
111 AnalysisContext context, AnalysisTarget target) { | 111 AnalysisContext context, AnalysisTarget target) { |
112 return new ParseYamlTask(context, target); | 112 return new ParseYamlTask(context, target); |
113 } | 113 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 */ | 146 */ |
147 const YamlErrorCode(String name, String message, [String correction]) | 147 const YamlErrorCode(String name, String message, [String correction]) |
148 : super(name, message, correction); | 148 : super(name, message, correction); |
149 | 149 |
150 @override | 150 @override |
151 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; | 151 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; |
152 | 152 |
153 @override | 153 @override |
154 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; | 154 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; |
155 } | 155 } |
OLD | NEW |