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

Side by Side Diff: pkg/docgen/lib/src/models/annotation.dart

Issue 701583003: Workaround for ConstantVisitor dependency issues. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 docgen.models.annotation; 5 library docgen.models.annotation;
6 6
7 import '../exports/source_mirrors.dart'; 7 import '../exports/source_mirrors.dart';
8 8
9 import '../exports/dart2js_mirrors.dart' show ResolvedNode; 9 import '../exports/dart2js_mirrors.dart' show ResolvedNode;
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 identical(beginToken.stringValue, opString)) { 76 identical(beginToken.stringValue, opString)) {
77 sb.write(' '); 77 sb.write(' ');
78 } 78 }
79 } 79 }
80 } 80 }
81 recursionLevel++; 81 recursionLevel++;
82 visit(node.argumentsNode); 82 visit(node.argumentsNode);
83 recursionLevel--; 83 recursionLevel--;
84 } 84 }
85 85
86 unparseNodeListFrom(NodeList node, var from, {spaces}) { 86 unparseNodeListFrom(NodeList node, var from, {bool spaces: true}) {
87 if (from.isEmpty) return; 87 if (from.isEmpty) return;
88 88
89 visit(from.head); 89 visit(from.head);
90 90
91 for (var link = from.tail; !link.isEmpty; link = link.tail) { 91 for (var link = from.tail; !link.isEmpty; link = link.tail) {
92 if (recursionLevel >= 2) { 92 if (recursionLevel >= 2) {
93 parameterValueCallback(sb.toString()); 93 parameterValueCallback(sb.toString());
94 sb.clear(); 94 sb.clear();
95 } 95 }
96 visit(link.head); 96 visit(link.head);
97 } 97 }
98 if (recursionLevel >= 2) { 98 if (recursionLevel >= 2) {
99 parameterValueCallback(sb.toString()); 99 parameterValueCallback(sb.toString());
100 sb.clear(); 100 sb.clear();
101 } 101 }
102 } 102 }
103 103
104 visitNodeList(NodeList node) { 104 visitNodeList(NodeList node) {
105 addToken(node.beginToken); 105 addToken(node.beginToken);
106 if (recursionLevel == 1) sb.clear(); 106 if (recursionLevel == 1) sb.clear();
107 if (node.nodes != null) { 107 if (node.nodes != null) {
108 recursionLevel++; 108 recursionLevel++;
109 unparseNodeListFrom(node, node.nodes); 109 unparseNodeListFrom(node, node.nodes);
110 recursionLevel--; 110 recursionLevel--;
111 } 111 }
112 if (node.endToken != null) write(node.endToken.value); 112 if (node.endToken != null) write(node.endToken.value);
113 } 113 }
114 } 114 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698