blob: 7ccd50b9649c04ba5e9f4ca6c3f36c5901351564 [file] [log] [blame]
#[doc = "The document model"];
type ast_id = int;
type cratedoc = ~{
topmod: moddoc,
};
type moddoc = ~{
id: ast_id,
name: str,
path: [str],
brief: option<str>,
desc: option<str>,
mods: modlist,
fns: fnlist
};
type fndoc = ~{
id: ast_id,
name: str,
brief: option<str>,
desc: option<str>,
args: [argdoc],
return: retdoc,
sig: option<str>
};
type argdoc = ~{
name: str,
desc: option<str>,
ty: option<str>
};
type retdoc = {
desc: option<str>,
ty: option<str>
};
// Just to break the structural recursive types
enum modlist = [moddoc];
enum fnlist = [fndoc];