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

Unified Diff: lib/src/backend/platform_selector/visitor.dart

Issue 1717483002: Make PlatformSelector use boolean_selector. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 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
« no previous file with comments | « lib/src/backend/platform_selector/token.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/backend/platform_selector/visitor.dart
diff --git a/lib/src/backend/platform_selector/visitor.dart b/lib/src/backend/platform_selector/visitor.dart
deleted file mode 100644
index 3687f1d86341f783708f14d128b663c8ebad3d34..0000000000000000000000000000000000000000
--- a/lib/src/backend/platform_selector/visitor.dart
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2015, 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.
-
-import 'ast.dart';
-
-/// The interface for visitors of the platform selector AST.
-abstract class Visitor<T> {
- T visitVariable(VariableNode node);
- T visitNot(NotNode node);
- T visitOr(OrNode node);
- T visitAnd(AndNode node);
- T visitConditional(ConditionalNode node);
-}
-
-/// An abstract superclass for side-effect-based visitors.
-///
-/// The default implementations of this visitor's methods just traverse the AST
-/// and do nothing with it.
-abstract class RecursiveVisitor implements Visitor {
- const RecursiveVisitor();
-
- void visitVariable(VariableNode node) {}
-
- void visitNot(NotNode node) {
- node.child.accept(this);
- }
-
- void visitOr(OrNode node) {
- node.left.accept(this);
- node.right.accept(this);
- }
-
- void visitAnd(AndNode node) {
- node.left.accept(this);
- node.right.accept(this);
- }
-
- void visitConditional(ConditionalNode node) {
- node.condition.accept(this);
- node.whenTrue.accept(this);
- node.whenFalse.accept(this);
- }
-}
« no previous file with comments | « lib/src/backend/platform_selector/token.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698