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

Side by Side Diff: pkg/front_end/lib/src/fasta/builder/ast_factory.dart

Issue 2829113002: Make AstFactory.variableDeclaration(charOffset) a required parameter. (Closed)
Patch Set: Created 3 years, 8 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/kernel/body_builder.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) 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:kernel/ast.dart'; 5 import 'package:kernel/ast.dart';
6 6
7 /// An abstract class containing factory methods that create AST objects. 7 /// An abstract class containing factory methods that create AST objects.
8 /// 8 ///
9 /// Itended for use by [BodyBuilder] so that it can create either analyzer or 9 /// Itended for use by [BodyBuilder] so that it can create either analyzer or
10 /// kernel ASTs depending on which concrete factory it is connected to. 10 /// kernel ASTs depending on which concrete factory it is connected to.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 /// Creates a variable declaration statement declaring one variable. 55 /// Creates a variable declaration statement declaring one variable.
56 /// 56 ///
57 /// TODO(paulberry): analyzer makes a distinction between a single variable 57 /// TODO(paulberry): analyzer makes a distinction between a single variable
58 /// declaration and a variable declaration statement (which can contain 58 /// declaration and a variable declaration statement (which can contain
59 /// multiple variable declarations). Currently this API only makes sense for 59 /// multiple variable declarations). Currently this API only makes sense for
60 /// kernel, which desugars each variable declaration to its own statement. 60 /// kernel, which desugars each variable declaration to its own statement.
61 /// 61 ///
62 /// If the variable declaration did not have an explicitly declared type, 62 /// If the variable declaration did not have an explicitly declared type,
63 /// [type] should be `null`. 63 /// [type] should be `null`.
64 VariableDeclaration variableDeclaration(String name, 64 VariableDeclaration variableDeclaration(String name, int charOffset,
65 {DartType type, 65 {DartType type,
66 Expression initializer, 66 Expression initializer,
67 int charOffset = TreeNode.noOffset,
68 int equalsCharOffset = TreeNode.noOffset, 67 int equalsCharOffset = TreeNode.noOffset,
69 bool isFinal: false, 68 bool isFinal: false,
70 bool isConst: false}); 69 bool isConst: false});
71 } 70 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/body_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698