Class Variable
Defined in: | src/nodes/variable.coffee |
Inherits: | Node |
Overview
Public: The Node representation of a CoffeeScript variable.
Instance Method Summary
- ::constructor(entity, node, lineMapping, options, classType = false, comment = null) Construct a variable node.
- ::getDoc() Get the class doc
- Number ::getLocation() Get the source line number
- String ::getName() Get the variable name
-
String ::getType()
Get the variable type, either
class
orconstant
- String ::getValue() Get the variable value.
- Boolean ::isConstant() Test if the given value should be treated ad constant.
- Object ::toJSON() Get a JSON representation of the object
Inherited Method Summary
Methods inherited from Node
Constructor Details
::constructor(entity, node, lineMapping, options, classType = false, comment = null) Source
Public: Construct a variable node.
entity - The variable's Class
node - The variable node (a Object)
lineMapping - An object mapping the actual position of a member to its Biscotto one
options - The parser options (a Object)
classType - A Boolean indicating if the class is a `class` or an `instance`
comment - The comment node (a Object)
Instance Method Details
::getDoc() Source
Public: Get the class doc
Returns the class doc (a [Doc]).
String ::getType() Source
Public: Get the variable type, either `class` or `constant`
Returns the variable type (a String).