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

Side by Side Diff: pkg/analyzer_plugin/tool/spec/to_html.dart

Issue 3002293003: Convert GeneratedContent to async and use AnalysisDriver for tasks graph. (Closed)
Patch Set: Created 3 years, 3 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 /** 5 /**
6 * Code for displaying the API as HTML. This is used both for generating a 6 * Code for displaying the API as HTML. This is used both for generating a
7 * full description of the API as a web page, and for generating doc comments 7 * full description of the API as a web page, and for generating doc comments
8 * in generated code. 8 * in generated code.
9 */ 9 */
10 import 'dart:convert'; 10 import 'dart:convert';
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 -webkit-margin-before: 0; 121 -webkit-margin-before: 0;
122 -webkit-margin-start: 0; 122 -webkit-margin-start: 0;
123 -webkit-padding-start: 0; 123 -webkit-padding-start: 0;
124 124
125 list-style-type: none; 125 list-style-type: none;
126 } 126 }
127 ''' 127 '''
128 .trim(); 128 .trim();
129 129
130 final GeneratedFile target = 130 final GeneratedFile target =
131 new GeneratedFile('doc/api.html', (String pkgPath) { 131 new GeneratedFile('doc/api.html', (String pkgPath) async {
132 ToHtmlVisitor visitor = new ToHtmlVisitor(readApi(pkgPath)); 132 ToHtmlVisitor visitor = new ToHtmlVisitor(readApi(pkgPath));
133 dom.Document document = new dom.Document(); 133 dom.Document document = new dom.Document();
134 document.append(new dom.DocumentType('html', null, null)); 134 document.append(new dom.DocumentType('html', null, null));
135 for (dom.Node node in visitor.collectHtml(visitor.visitApi)) { 135 for (dom.Node node in visitor.collectHtml(visitor.visitApi)) {
136 document.append(node); 136 document.append(node);
137 } 137 }
138 return document.outerHtml; 138 return document.outerHtml;
139 }); 139 });
140 140
141 String _toTitleCase(String str) { 141 String _toTitleCase(String str) {
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 bool verticalBarNeeded = false; 818 bool verticalBarNeeded = false;
819 for (TypeDecl choice in typeUnion.choices) { 819 for (TypeDecl choice in typeUnion.choices) {
820 if (verticalBarNeeded) { 820 if (verticalBarNeeded) {
821 write(' | '); 821 write(' | ');
822 } 822 }
823 visitTypeDecl(choice); 823 visitTypeDecl(choice);
824 verticalBarNeeded = true; 824 verticalBarNeeded = true;
825 } 825 }
826 } 826 }
827 } 827 }
OLDNEW
« no previous file with comments | « pkg/analyzer_plugin/tool/spec/generate_all.dart ('k') | pkg/front_end/lib/src/codegen/tools.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698