diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-01-24 22:45:34 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-01-24 23:24:55 -0800 |
| commit | 61b5cc95d172acd69488c5df661e1fcf3b3cc190 (patch) | |
| tree | 8ebcbca472a9ffa7ea57669d19305dd03bbef9e4 /src/rustdoc | |
| parent | b779277daecb81efc0d6b0d9920c35d283e10530 (diff) | |
rustdoc: Add enums to the doc tree
Diffstat (limited to 'src/rustdoc')
| -rw-r--r-- | src/rustdoc/doc.rs | 18 | ||||
| -rw-r--r-- | src/rustdoc/extract.rs | 3 | ||||
| -rwxr-xr-x | src/rustdoc/rustdoc.rs | 6 |
3 files changed, 23 insertions, 4 deletions
diff --git a/src/rustdoc/doc.rs b/src/rustdoc/doc.rs index 0e2f081ee39..1aee7682a32 100644 --- a/src/rustdoc/doc.rs +++ b/src/rustdoc/doc.rs @@ -14,7 +14,8 @@ type moddoc = ~{ desc: option<str>, mods: modlist, fns: fnlist, - consts: constlist + consts: constlist, + enums: enumlist }; type constdoc = ~{ @@ -47,7 +48,22 @@ type retdoc = { ty: option<str> }; +type enumdoc = ~{ + id: ast_id, + name: str, + brief: option<str>, + desc: option<str>, + variants: [variantdoc] +}; + +type variantdoc = ~{ + name: str, + desc: option<str>, + sig: option<str> +}; + // Just to break the structural recursive types enum modlist = [moddoc]; enum constlist = [constdoc]; enum fnlist = [fndoc]; +enum enumlist = [enumdoc]; \ No newline at end of file diff --git a/src/rustdoc/extract.rs b/src/rustdoc/extract.rs index 34fd89bc5a7..71667b60bc2 100644 --- a/src/rustdoc/extract.rs +++ b/src/rustdoc/extract.rs @@ -76,7 +76,8 @@ fn moddoc_from_mod( none } } - }) + }), + enums: doc::enumlist([]) } } diff --git a/src/rustdoc/rustdoc.rs b/src/rustdoc/rustdoc.rs index 45b20aefc6c..2612af68ff7 100755 --- a/src/rustdoc/rustdoc.rs +++ b/src/rustdoc/rustdoc.rs @@ -47,7 +47,8 @@ fn test_run_passes() { desc: none, mods: doc::modlist([]), fns: doc::fnlist([]), - consts: doc::constlist([]) + consts: doc::constlist([]), + enums: doc::enumlist([]) } } } @@ -64,7 +65,8 @@ fn test_run_passes() { desc: none, mods: doc::modlist([]), fns: doc::fnlist([]), - consts: doc::constlist([]) + consts: doc::constlist([]), + enums: doc::enumlist([]) } } } |
