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

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

Issue 2802433003: Make the AstFactory API refer to kernel types rather than "shadow" types. (Closed)
Patch Set: dartfmt 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/kernel_ast_factory.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/builder/ast_factory.dart
diff --git a/pkg/front_end/lib/src/fasta/builder/ast_factory.dart b/pkg/front_end/lib/src/fasta/builder/ast_factory.dart
index 01c63324b98a823c010c99ec89e2580db83b2018..1c2cfd00d68eef9c2924dcf56986932fe91299a0 100644
--- a/pkg/front_end/lib/src/fasta/builder/ast_factory.dart
+++ b/pkg/front_end/lib/src/fasta/builder/ast_factory.dart
@@ -2,9 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import 'package:kernel/ast.dart' show DartType, TreeNode;
-
-import 'shadow_ast.dart';
+import 'package:kernel/ast.dart';
/// An abstract class containing factory methods that create AST objects.
///
@@ -36,23 +34,23 @@ import 'shadow_ast.dart';
/// exact tokens that were used to specify a type.
abstract class AstFactory {
/// Creates a statement block.
- ShadowBlock block(List<ShadowStatement> statements, int charOffset);
+ Block block(List<Statement> statements, int charOffset);
/// Creates an integer literal.
- ShadowIntLiteral intLiteral(value, int charOffset);
+ IntLiteral intLiteral(value, int charOffset);
/// Creates a list literal expression.
///
/// If the list literal did not have an explicitly declared type argument,
/// [typeArgument] should be `null`.
- ShadowListLiteral listLiteral(List<ShadowExpression> expressions,
- DartType typeArgument, bool isConst, int charOffset);
+ ListLiteral listLiteral(List<Expression> expressions, DartType typeArgument,
+ bool isConst, int charOffset);
/// Creates a null literal expression.
- ShadowNullLiteral nullLiteral(int charOffset);
+ NullLiteral nullLiteral(int charOffset);
/// Creates a return statement.
- ShadowStatement returnStatement(ShadowExpression expression, int charOffset);
+ Statement returnStatement(Expression expression, int charOffset);
/// Creates a variable declaration statement declaring one variable.
///
@@ -63,9 +61,9 @@ abstract class AstFactory {
///
/// If the variable declaration did not have an explicitly declared type,
/// [type] should be `null`.
- ShadowVariableDeclaration variableDeclaration(String name,
+ VariableDeclaration variableDeclaration(String name,
{DartType type,
- ShadowExpression initializer,
+ Expression initializer,
int charOffset: TreeNode.noOffset,
bool isFinal: false,
bool isConst: false});
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/kernel_ast_factory.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698