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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_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 | « pkg/front_end/lib/src/fasta/builder/ast_factory.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/kernel/kernel_ast_factory.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_factory.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_factory.dart
index 7a3501c2325d5774575cdc9ab50c72f7f3bc13f5..8d41521a25a019ab71c191a137ec06ffd3a79d1d 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_factory.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_factory.dart
@@ -2,16 +2,15 @@
// 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;
+import 'package:kernel/ast.dart';
import '../builder/ast_factory.dart';
-import '../builder/shadow_ast.dart';
import 'kernel_shadow_ast.dart';
/// Concrete implementation of [builder.AstFactory] for building a kernel AST.
class KernelAstFactory implements AstFactory {
@override
- KernelBlock block(List<ShadowStatement> statements, int charOffset) {
+ KernelBlock block(List<Statement> statements, int charOffset) {
return new KernelBlock(statements)..fileOffset = charOffset;
}
@@ -21,10 +20,11 @@ class KernelAstFactory implements AstFactory {
}
@override
- KernelListLiteral listLiteral(List<ShadowExpression> expressions,
+ KernelListLiteral listLiteral(List<Expression> expressions,
DartType typeArgument, bool isConst, int charOffset) {
return new KernelListLiteral(expressions,
- typeArgument: typeArgument, isConst: isConst)..fileOffset = charOffset;
+ typeArgument: typeArgument, isConst: isConst)
+ ..fileOffset = charOffset;
}
@override
@@ -33,15 +33,14 @@ class KernelAstFactory implements AstFactory {
}
@override
- KernelReturnStatement returnStatement(
- ShadowExpression expression, int charOffset) {
+ KernelReturnStatement returnStatement(Expression expression, int charOffset) {
return new KernelReturnStatement(expression)..fileOffset = charOffset;
}
@override
KernelVariableDeclaration variableDeclaration(String name,
{DartType type,
- ShadowExpression initializer,
+ Expression initializer,
int charOffset,
bool isFinal: false,
bool isConst: false}) {
@@ -49,6 +48,7 @@ class KernelAstFactory implements AstFactory {
type: type,
initializer: initializer,
isFinal: isFinal,
- isConst: isConst)..fileEqualsOffset = charOffset;
+ isConst: isConst)
+ ..fileEqualsOffset = charOffset;
}
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/builder/ast_factory.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698