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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/verifier.dart

Issue 2707263009: Store redirecting constructors. (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 side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/kernel/verifier.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/verifier.dart b/pkg/front_end/lib/src/fasta/kernel/verifier.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7a0c16c0c2d5e8b26a66616bdfc8f90423f91386
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/kernel/verifier.dart
@@ -0,0 +1,34 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// 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.
+
+library fasta.verifier;
+
+import 'package:kernel/ast.dart' show
+ ExpressionStatement,
+ Program;
+
+import 'package:kernel/verifier.dart' show
+ VerifyingVisitor;
+
+import 'redirecting_factory_body.dart' show
+ RedirectingFactoryBody;
+
+void verifyProgram(Program program, {bool isOutline: false}) {
+ program.accept(new FastaVerifyingVisitor(isOutline));
+}
+
+class FastaVerifyingVisitor extends VerifyingVisitor {
+ FastaVerifyingVisitor(bool isOutline) {
+ this.isOutline = isOutline;
+ }
+
+ @override
+ visitExpressionStatement(ExpressionStatement node) {
+ // Bypass verification of the [StaticGet] in [RedirectingFactoryBody] as
+ // this is a static get without a getter.
+ if (node is! RedirectingFactoryBody) {
+ super.visitExpressionStatement(node);
+ }
+ }
+}
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/redirecting_factory_body.dart ('k') | pkg/front_end/lib/src/fasta/outline.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698