Class: Parser

Defined in: src/parser.coffee

Overview

CoffeeScript parser to convert the files into a

Instance Method Summary

Constructor Details

.constructor(options) Source

Construct the parser

Parameters:

  • optionsthe parser options (a [Object])

Instance Method Details

.convertComments(content) Source

Convert the comments to block comments, so they appear in the nodes.

Parameters:

  • contentthe CoffeeScript file content (a [String])

.getAllMethods() Source

Get all parsed methods

Returns:

  • Returns (a ) [Array] all methods

.getAllVariables() Source

Get all parsed variables

Returns:

  • Returns (a ) [Array] all variables

.linkAncestors(node) Source

Attach each parent to its children, so we are able

Parameters:

  • nodesthe CoffeeScript nodes (a [Base])

.parseContent(content, file = '') Source

Parse the given CoffeeScript content

Parameters:

  • contentthe CoffeeScript file content (a [String])
  • filethe CoffeeScript file name (a [String])

.parseFile(file) Source

Parse the given CoffeeScript file

Parameters:

  • filethe CoffeeScript file name (a [String])

.showResult(generator) Source

Show the parsing statistics

.toJSON() Source

Get a JSON representation of the object

Returns:

  • Returns the JSON object (a [Object])