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

Unified Diff: pkg/yaml/lib/src/visitor.dart

Issue 689513002: Rewrite the pkg/yaml parser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 6 years, 1 month 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/yaml/lib/src/utils.dart ('k') | pkg/yaml/lib/src/yaml_document.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/yaml/lib/src/visitor.dart
diff --git a/pkg/yaml/lib/src/visitor.dart b/pkg/yaml/lib/src/visitor.dart
deleted file mode 100644
index 3f4c45538078bb86745a85451c0a9ed6518adef1..0000000000000000000000000000000000000000
--- a/pkg/yaml/lib/src/visitor.dart
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 2012, 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 yaml.visitor;
-
-import 'equality.dart';
-import 'model.dart';
-
-/// The visitor pattern for YAML documents.
-class Visitor {
- /// Returns [alias].
- visitAlias(AliasNode alias) => alias;
-
- /// Returns [scalar].
- visitScalar(ScalarNode scalar) => scalar;
-
- /// Visits each node in [seq] and returns a list of the results.
- visitSequence(SequenceNode seq)
- => seq.content.map((e) => e.visit(this)).toList();
-
- /// Visits each key and value in [map] and returns a map of the results.
- visitMapping(MappingNode map) {
- var out = deepEqualsMap();
- for (var key in map.content.keys) {
- out[key.visit(this)] = map.content[key].visit(this);
- }
- return out;
- }
-}
« no previous file with comments | « pkg/yaml/lib/src/utils.dart ('k') | pkg/yaml/lib/src/yaml_document.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698