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

Side by Side Diff: pkg/analyzer/lib/src/fasta/ast_builder.dart

Issue 2935993002: Implement metadata on methods and fields. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/fasta_codes_generated.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.analyzer.ast_builder; 5 library fasta.analyzer.ast_builder;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/dart/ast/ast_factory.dart' show AstFactory; 8 import 'package:analyzer/dart/ast/ast_factory.dart' show AstFactory;
9 import 'package:analyzer/dart/ast/standard_ast_factory.dart' as standard; 9 import 'package:analyzer/dart/ast/standard_ast_factory.dart' as standard;
10 import 'package:analyzer/dart/ast/token.dart' as analyzer show Token; 10 import 'package:analyzer/dart/ast/token.dart' as analyzer show Token;
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 List statements = popList(count); 283 List statements = popList(count);
284 if (beginToken != null) { 284 if (beginToken != null) {
285 exitLocalScope(); 285 exitLocalScope();
286 } 286 }
287 Block block = ast.block(beginToken, statements, endToken); 287 Block block = ast.block(beginToken, statements, endToken);
288 analyzer.Token star = pop(); 288 analyzer.Token star = pop();
289 analyzer.Token asyncKeyword = pop(); 289 analyzer.Token asyncKeyword = pop();
290 push(ast.blockFunctionBody(asyncKeyword, star, block)); 290 push(ast.blockFunctionBody(asyncKeyword, star, block));
291 } 291 }
292 292
293 void finishFunction(formals, asyncModifier, FunctionBody body) { 293 void finishFunction(annotations, formals, asyncModifier, FunctionBody body) {
294 debugEvent("finishFunction"); 294 debugEvent("finishFunction");
295 Statement bodyStatement; 295 Statement bodyStatement;
296 if (body is EmptyFunctionBody) { 296 if (body is EmptyFunctionBody) {
297 bodyStatement = ast.emptyStatement(body.semicolon); 297 bodyStatement = ast.emptyStatement(body.semicolon);
298 } else if (body is ExpressionFunctionBody) { 298 } else if (body is ExpressionFunctionBody) {
299 bodyStatement = ast.returnStatement(null, body.expression, null); 299 bodyStatement = ast.returnStatement(null, body.expression, null);
300 } else { 300 } else {
301 bodyStatement = (body as BlockFunctionBody).block; 301 bodyStatement = (body as BlockFunctionBody).block;
302 } 302 }
303 var kernel = toKernel(bodyStatement, elementStore, library.library, scope); 303 var kernel = toKernel(bodyStatement, elementStore, library.library, scope);
(...skipping 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after
2021 } else if (identical('var', s)) { 2021 } else if (identical('var', s)) {
2022 finalConstOrVarKeyword = token; 2022 finalConstOrVarKeyword = token;
2023 } else if (identical('covariant', s)) { 2023 } else if (identical('covariant', s)) {
2024 covariantKeyword = token; 2024 covariantKeyword = token;
2025 } else { 2025 } else {
2026 internalError('Unhandled modifier: $s'); 2026 internalError('Unhandled modifier: $s');
2027 } 2027 }
2028 } 2028 }
2029 } 2029 }
2030 } 2030 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/fasta_codes_generated.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698