OLD | NEW |
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 /** | 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 {}, | 346 {}, |
347 () => link('request_${request.longMethod}', | 347 () => link('request_${request.longMethod}', |
348 () => write(request.method))); | 348 () => write(request.method))); |
349 } | 349 } |
350 } | 350 } |
351 }); | 351 }); |
352 } | 352 } |
353 | 353 |
354 void generateTableOfContents() { | 354 void generateTableOfContents() { |
355 for (var domain in api.domains.where((domain) => !domain.experimental)) { | 355 for (var domain in api.domains.where((domain) => !domain.experimental)) { |
| 356 if (domain.experimental) continue; |
| 357 |
356 writeln(); | 358 writeln(); |
357 | 359 |
358 p(() { | 360 p(() { |
359 link('domain_${domain.name}', () { | 361 link('domain_${domain.name}', () { |
360 write(_toTitleCase(domain.name)); | 362 write(_toTitleCase(domain.name)); |
361 }); | 363 }); |
362 }); | 364 }); |
363 | 365 |
364 ul(() { | 366 ul(() { |
365 for (Request request in domain.requests) { | 367 for (Request request in domain.requests) { |
| 368 if (request.experimental) continue; |
| 369 |
366 li(() { | 370 li(() { |
367 link('request_${request.longMethod}', () { | 371 link('request_${request.longMethod}', () { |
368 write(request.longMethod); | 372 write(request.longMethod); |
369 }, request.deprecated ? {'class': 'deprecated'} : null); | 373 }, request.deprecated ? {'class': 'deprecated'} : null); |
370 }); | 374 }); |
371 writeln(); | 375 writeln(); |
372 } | 376 } |
373 }); | 377 }); |
374 | 378 |
375 writeln(); | 379 writeln(); |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 bool verticalBarNeeded = false; | 819 bool verticalBarNeeded = false; |
816 for (TypeDecl choice in typeUnion.choices) { | 820 for (TypeDecl choice in typeUnion.choices) { |
817 if (verticalBarNeeded) { | 821 if (verticalBarNeeded) { |
818 write(' | '); | 822 write(' | '); |
819 } | 823 } |
820 visitTypeDecl(choice); | 824 visitTypeDecl(choice); |
821 verticalBarNeeded = true; | 825 verticalBarNeeded = true; |
822 } | 826 } |
823 } | 827 } |
824 } | 828 } |
OLD | NEW |