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

Side by Side Diff: pkg/yaml/lib/src/constructor.dart

Issue 274953002: Bring the YAML package's style up to modern standards. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library constructor; 5 library yaml.constructor;
6 6
7 import 'model.dart'; 7 import 'model.dart';
8 import 'visitor.dart'; 8 import 'visitor.dart';
9 import 'yaml_map.dart'; 9 import 'yaml_map.dart';
10 10
11 /// Takes a parsed and composed YAML document (what the spec calls the 11 /// Takes a parsed and composed YAML document (what the spec calls the
12 /// "representation graph") and creates native Dart objects that represent that 12 /// "representation graph") and creates native Dart objects that represent that
13 /// document. 13 /// document.
14 class Constructor extends Visitor { 14 class Constructor extends Visitor {
15 /// The root node of the representation graph. 15 /// The root node of the representation graph.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 if (_anchors.containsKey(anchored.anchor)) return _anchors[anchored.anchor]; 51 if (_anchors.containsKey(anchored.anchor)) return _anchors[anchored.anchor];
52 } 52 }
53 53
54 /// Records that [value] is the Dart object representing [anchored]. 54 /// Records that [value] is the Dart object representing [anchored].
55 setAnchor(Node anchored, value) { 55 setAnchor(Node anchored, value) {
56 if (anchored.anchor == null) return value; 56 if (anchored.anchor == null) return value;
57 _anchors[anchored.anchor] = value; 57 _anchors[anchored.anchor] = value;
58 return value; 58 return value;
59 } 59 }
60 } 60 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698