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

Side by Side Diff: pkg/analyzer/tool/summary/mini_ast.dart

Issue 2970273004: Deprecate all diagnostics methods that use strings. (Closed)
Patch Set: Created 3 years, 5 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'package:front_end/src/fasta/errors.dart' show internalError; 5 import 'package:front_end/src/fasta/deprecated_problems.dart'
6 show deprecated_internalProblem;
6 import 'package:front_end/src/fasta/fasta_codes.dart' show FastaMessage; 7 import 'package:front_end/src/fasta/fasta_codes.dart' show FastaMessage;
7 import 'package:front_end/src/fasta/parser/identifier_context.dart'; 8 import 'package:front_end/src/fasta/parser/identifier_context.dart';
8 import 'package:front_end/src/fasta/parser/parser.dart'; 9 import 'package:front_end/src/fasta/parser/parser.dart';
9 import 'package:front_end/src/fasta/source/stack_listener.dart'; 10 import 'package:front_end/src/fasta/source/stack_listener.dart';
10 import 'package:front_end/src/scanner/token.dart'; 11 import 'package:front_end/src/scanner/token.dart';
11 12
12 /// "Mini AST" representation of a declaration which can accept annotations. 13 /// "Mini AST" representation of a declaration which can accept annotations.
13 class AnnotatedNode { 14 class AnnotatedNode {
14 final Comment documentationComment; 15 final Comment documentationComment;
15 16
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 class MiniAstBuilder extends StackListener { 151 class MiniAstBuilder extends StackListener {
151 bool inMetadata = false; 152 bool inMetadata = false;
152 153
153 final compilationUnit = new CompilationUnit(); 154 final compilationUnit = new CompilationUnit();
154 155
155 @override 156 @override
156 Uri get uri => null; 157 Uri get uri => null;
157 158
158 @override 159 @override
159 void addCompileTimeErrorFromMessage(FastaMessage message) { 160 void addCompileTimeErrorFromMessage(FastaMessage message) {
160 internalError(message.message); 161 deprecated_internalProblem(message.message);
161 } 162 }
162 163
163 @override 164 @override
164 void beginMetadata(Token token) { 165 void beginMetadata(Token token) {
165 inMetadata = true; 166 inMetadata = true;
166 } 167 }
167 168
168 @override 169 @override
169 void beginMetadataStar(Token token) { 170 void beginMetadataStar(Token token) {
170 debugEvent("beginMetadataStar"); 171 debugEvent("beginMetadataStar");
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 208
208 @override 209 @override
209 void endCombinators(int count) { 210 void endCombinators(int count) {
210 debugEvent("Combinators"); 211 debugEvent("Combinators");
211 } 212 }
212 213
213 @override 214 @override
214 void endConditionalUris(int count) { 215 void endConditionalUris(int count) {
215 debugEvent("ConditionalUris"); 216 debugEvent("ConditionalUris");
216 if (count != 0) { 217 if (count != 0) {
217 internalError('Conditional URIs are not supported by summary codegen'); 218 deprecated_internalProblem(
219 'Conditional URIs are not supported by summary codegen');
218 } 220 }
219 } 221 }
220 222
221 @override 223 @override
222 void endConstructorReference( 224 void endConstructorReference(
223 Token start, Token periodBeforeName, Token endToken) { 225 Token start, Token periodBeforeName, Token endToken) {
224 debugEvent("ConstructorReference"); 226 debugEvent("ConstructorReference");
225 String constructorName = popIfNotNull(periodBeforeName); 227 String constructorName = popIfNotNull(periodBeforeName);
226 pop(); // Type arguments 228 pop(); // Type arguments
227 String name = pop(); 229 String name = pop();
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 final String name; 472 final String name;
471 473
472 final List<TypeName> typeArguments; 474 final List<TypeName> typeArguments;
473 475
474 TypeName(this.name, this.typeArguments); 476 TypeName(this.name, this.typeArguments);
475 } 477 }
476 478
477 /// "Mini AST" representation of an expression which summary code generation 479 /// "Mini AST" representation of an expression which summary code generation
478 /// need not be concerned about. 480 /// need not be concerned about.
479 class UnknownExpression extends Expression {} 481 class UnknownExpression extends Expression {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698