AST Class
The AST(Abstract syntax tree) of the comment
Index
Properties
Properties
project
Object
About the project
files
Object
The files
codes
Object
The source codes
modules
Object
The modules
classes
Object
The classes
members
Array
The members
inheritedMembers
Array
The inherited members
commentsMap
Object
The comments map object
syntaxType
String
The syntax type
context
Context
The context object
Methods
create
(
-
files
-
dirs
-
[syntaxType]
)
AST
-
files -
dirs -
[syntaxType]
Create a AST object
parameters:
-
filesObjectThe files -
dirsObjectThe directorys -
syntaxTypeStringThe syntax type:coffeeorjs
returns:
reset
()
Reset the AST instance
oncomment
(
-
comment
-
filename
-
linenum
)
Object
-
comment -
filename -
linenum
parameters:
-
commentString -
filenameString -
linenumString
returns:
onblock
(
-
an
)
-
an
Processes all the tags in a single comment block
parameters:
-
anArrayarray of the tag/text pairs
ontag
(
-
item
)
-
item
Process tag
parameters:
-
itemObject-
tagString -
valueObject
-
extract
(
-
files
-
dirs
)
-
files -
dirs
Accepts a map of filenames to file content. Returns a map of filenames to an array of API comment block text. This expects the comment to start with / * on its own line, and end with / on its own line. Override this function to provide an alternative comment parser.
parameters:
-
filesObject -
dirsObject
transform
(
-
commentmap
)
Object
-
commentmap
Transforms a map of filenames to arrays of comment blocks into a JSON structure that represents the entire processed API doc info and relationships between elements for the entire project.
parameters:
-
commentmapObjectThe hash of files and parsed comment blocks
returns:
The transformed data for the project
resolveFor
(
-
value
)
String
private
-
value
Takes a non-namespaced classname and resolves it to a namespace (to support @for)
parameters:
-
valueStringThe classname to resolve
returns:
The resolved namespace + classname