class Myst::Doc::Generator
- Myst::Doc::Generator
- Reference
- Object
Overview
An AST visitor for parsing doc comments from Myst source code and emitting the content in a JSON structure.
Currently only operates on the given source, does not follow require
s or
other imports.
Defined in:
myst/tools/doc.crConstructors
Class Method Summary
-
.auto_document(directory, doc_yml)
Automatically scan everything in the current directory to find Myst files that can be documented.
Instance Method Summary
- #document(node : Node)
- #json
- #visit(node : DocComment)
- #visit(node : ModuleDef, doc : String | Nil = nil)
- #visit(node : TypeDef, doc : String | Nil = nil)
- #visit(node : Def, doc : String | Nil = nil)
-
#visit(node : SimpleAssign, doc : String | Nil = nil)
Only constants that are assigned with SimpleAssigns are documentable.
-
#visit(node : Node, doc : String | Nil = nil)
Automatically recurse through all non-special nodes
Constructor Detail
Class Method Detail
def self.auto_document(directory, doc_yml)
#
Automatically scan everything in the current directory to find Myst files that can be documented.
Instance Method Detail
Only constants that are assigned with SimpleAssigns are documentable. The entire SimpleAssign is visited so that the value being assigned can also be captured and added to the documentation.
Automatically recurse through all non-special nodes