Skip to content

Latest commit

 

History

History
290 lines (167 loc) · 8.76 KB

AST.md

File metadata and controls

290 lines (167 loc) · 8.76 KB

firedoc 1.9.2

Fireball is the game engine for the future.

AST Class

Defined in: lib/ast.js:65

Module: firedoc

The AST(Abstract syntax tree) of the comment

Index

Properties
Methods
  • create Create a AST object
  • reset Reset the AST instance
  • oncomment
  • onblock Processes all the tags in a single comment block
  • ontag Process tag
  • extract 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.
  • transform 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.

Details

Properties

project

About the project

meta description
Type Object
Defined lib/ast.js:72
files

The files

meta description
Type Object
Defined lib/ast.js:77
codes

The source codes

meta description
Type Object
Defined lib/ast.js:82
modules

The modules

meta description
Type Object
Defined lib/ast.js:87
classes

The classes

meta description
Type Object
Defined lib/ast.js:92
members

The members

meta description
Type Array
Defined lib/ast.js:97
inheritedMembers

The inherited members

meta description
Type Array
Defined lib/ast.js:102
namespacesMap

The namespaces map object

meta description
Type Object
Defined lib/ast.js:107
commentsMap

The comments map object

meta description
Type Object
Defined lib/ast.js:112
syntaxType

The syntax type

meta description
Type String
Defined lib/ast.js:117
context

The context object

meta description
Type Context
Defined lib/ast.js:122

Methods

create

Create a AST object

meta description
Defined lib/ast.js:132
Return AST
Parameters
  • files Object The files
  • dirs Object The directorys
  • syntaxType String The syntax type: coffee or js
reset

Reset the AST instance

meta description
Defined lib/ast.js:151
oncomment
meta description
Defined lib/ast.js:174
Return Object
Parameters
onblock

Processes all the tags in a single comment block

meta description
Defined lib/ast.js:244
Parameters
  • an Array array of the tag/text pairs
ontag

Process tag

meta description
Defined lib/ast.js:327
Parameters
extract

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.

meta description
Defined lib/ast.js:383
Parameters
transform

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.

meta description
Defined lib/ast.js:423
Return Object
Parameters
  • commentmap Object The hash of files and parsed comment blocks