History

ckdoc generate index.html plus several enhancements (spencer + ge)

Ge Wang committed 3 years ago

Commit ff084df1 parent cd9bf567 files · +217 −63Browse files

Showing the changes to src/scripts (2 of 7 files). Show all

Unified · Split

2 files
  1. src/scripts/ckdoc/test-all.ck +22 −2
  2. src/scripts/ckdoc/test-class.ck +25 −0
src/scripts/ckdoc/test-all.ck+22−2
@@ -15,7 +15,27 @@ Type.getTypes( · 14 unmodified lines
15// instantiate15// instantiate
16CKDoc doc; // documentation orchestra16CKDoc doc; // documentation orchestra
17 17
18// set the examples root
19"https://chuck.stanford.edu/doc/examples/" => doc.examplesRoot;
20
21// add as group
22doc.addGroup( types, "Base Types (compiled in)", "base", "Base types in the ChucK" );
23
24types.clear();
25// get types currently in ChucK type system
26Type.getTypes(
27 types, // to be filled with results
28 true, // include objects
29 false, // include primitive types
30 false, // include special types (@array and @function)
31 false, // include builtin types
32 true, // include types from chugins
33 false, // include types from ck files in lib path
34 false // include user-defined classes
35);
36
18// add as group37// add as group
19doc.addGroup( types, "All", "all", "Here are some types in the ChucK VM" );38doc.addGroup( types, "Base Types (chugins)", "chugins", "ChucK Objects loaded from chugins" );
39
20// generate40// generate
21doc.outputToDir( "." );41doc.outputToDir( ".", "ChucK Class Library Reference" );
src/scripts/ckdoc/test-class.ck+25−0
@@ -0,0 +1,25 @@
1public class Foo
2{
3 /** a is an integer; nothing uses this. */
4 int a;
5 /** b is a float; nothing uses this either. */
6 float b;
7
8 /** this function does nothing. */
9 fun void bar( int x )
10 {
11 // \o/ this function does nothing" \o/
12 // => this function does nothing" <=
13 //=> this function does nothing
14 /*=> */
15 }
16}
17
18[ Foo.typeOf() ] @=> Type types[];
19
20CKDoc doc;
21
22doc.addGroup( types, "my classes!", "my", "Will this work?" );
23
24// generate
25doc.outputToDir( ".", "My Class Library" );

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t