SJSD.Parser

This is the code parser class. It is responsible for reading and parsing javascript files in order to create a JSON structure which can then be fed through the templates.

Entities

DocNode
The DocNode hash represents the JSON structure after parsing a comment block

Functions

addFile(fileName)
Read a javascript source file and add its contents to the list of what should be search for doc strings
appendChild(parent, child)
Insert the child in the children array of a parent
createTreeOutline()
Generate the end JSON structure for the documentation
debug(message)
Write a debug message to the console if debug is enabled
findParent(child)
Find the parent of a docnode
findTopLevel()
Find what block type we should start at when building the parse tree
fixParams()
Go through all blocks of the function type and construct lists of function params
fixShortDesc()
Extract short descriptions for all blocks that didn't set them explicitly
parseBlock(block)
Parse a comment block into a JSON a structure
parseData()
Starting point for building the parse tree from the source string
spam(message)
Write a debug message to the console if spam is enabled