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

Side by Side Diff: pkg/front_end/lib/src/fasta/source/outline_builder.dart

Issue 2685213003: Don't return values that aren't used. (Closed)
Patch Set: Created 3 years, 10 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) 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 fasta.outline_builder; 5 library fasta.outline_builder;
6 6
7 import 'package:kernel/ast.dart' show 7 import 'package:kernel/ast.dart' show
8 AsyncMarker, 8 AsyncMarker,
9 ProcedureKind; 9 ProcedureKind;
10 10
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 if (optional("set", token)) return ProcedureKind.Setter; 218 if (optional("set", token)) return ProcedureKind.Setter;
219 return internalError("Unhandled: ${token.value}"); 219 return internalError("Unhandled: ${token.value}");
220 } 220 }
221 221
222 @override 222 @override
223 void beginTopLevelMethod(Token token, Token name) { 223 void beginTopLevelMethod(Token token, Token name) {
224 library.beginNestedDeclaration(hasMembers: false); 224 library.beginNestedDeclaration(hasMembers: false);
225 } 225 }
226 226
227 @override 227 @override
228 ProcedureBuilder endTopLevelMethod( 228 void endTopLevelMethod(
229 Token beginToken, Token getOrSet, Token endToken) { 229 Token beginToken, Token getOrSet, Token endToken) {
230 debugEvent("endTopLevelMethod"); 230 debugEvent("endTopLevelMethod");
231 MethodBody kind = pop(); 231 MethodBody kind = pop();
232 AsyncMarker asyncModifier = pop(); 232 AsyncMarker asyncModifier = pop();
233 List<FormalParameterBuilder> formals = pop(); 233 List<FormalParameterBuilder> formals = pop();
234 List<TypeVariableBuilder> typeVariables = pop(); 234 List<TypeVariableBuilder> typeVariables = pop();
235 String name = pop(); 235 String name = pop();
236 TypeBuilder returnType = pop(); 236 TypeBuilder returnType = pop();
237 int modifiers = Modifier.validate(pop(), 237 int modifiers = Modifier.validate(pop(),
238 isAbstract: kind == MethodBody.Abstract); 238 isAbstract: kind == MethodBody.Abstract);
239 List<MetadataBuilder> metadata = pop(); 239 List<MetadataBuilder> metadata = pop();
240 checkEmpty(); 240 checkEmpty();
241 return library.addProcedure(metadata, modifiers, returnType, name, 241 library.addProcedure(metadata, modifiers, returnType, name,
242 typeVariables, formals, asyncModifier, computeProcedureKind(getOrSet), 242 typeVariables, formals, asyncModifier, computeProcedureKind(getOrSet),
243 beginToken.charOffset); 243 beginToken.charOffset);
244 } 244 }
245 245
246 @override 246 @override
247 void handleNoFunctionBody(Token token) { 247 void handleNoFunctionBody(Token token) {
248 debugEvent("NoFunctionBody"); 248 debugEvent("NoFunctionBody");
249 push(MethodBody.Abstract); 249 push(MethodBody.Abstract);
250 } 250 }
251 251
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 Link<Token> handleMemberName(Link<Token> identifiers) { 585 Link<Token> handleMemberName(Link<Token> identifiers) {
586 if (!isDartLibrary || identifiers.isEmpty) return identifiers; 586 if (!isDartLibrary || identifiers.isEmpty) return identifiers;
587 return removeNativeClause(identifiers); 587 return removeNativeClause(identifiers);
588 } 588 }
589 589
590 @override 590 @override
591 void debugEvent(String name) { 591 void debugEvent(String name) {
592 // printEvent(name); 592 // printEvent(name);
593 } 593 }
594 } 594 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698