switched to Gulp
This commit is contained in:
730
doc/class/Node.html
Normal file
730
doc/class/Node.html
Normal file
@@ -0,0 +1,730 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>CoffeeScript API Documentation</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta'>
|
||||
Yatta
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>Node</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
Node
|
||||
<span class='note title'>Abstract</span>
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>node_modules/grunt-codo/node_modules/codo/node_modules/haml-coffee/src/nodes/node.coffee</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<div class='abstract note'>
|
||||
<strong>
|
||||
This
|
||||
class
|
||||
is abstract.
|
||||
</strong>
|
||||
|
||||
</div>
|
||||
<p>Base class for the syntax tree.</p><p>This will provide some methods that subclasses must use in order to generate
|
||||
some output:</p><ul>
|
||||
<li>{#markText}</li>
|
||||
<li>{#markRunningCode}</li>
|
||||
<li>{#markInsertingCode}</li>
|
||||
</ul><p>Each node must mark the <code>@opener</code> attribute and can optionally mark the <code>@closer</code>
|
||||
attribute.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Direct Known Subclasses</h2>
|
||||
<p class='children'>
|
||||
<a href='../class/Code.html'>Code</a>
|
||||
<a href='../class/Comment.html'>Comment</a>
|
||||
<a href='../class/Directive.html'>Directive</a>
|
||||
<a href='../class/Filter.html'>Filter</a>
|
||||
<a href='../class/Haml.html'>Haml</a>
|
||||
<a href='../class/Text.html'>Text</a>
|
||||
</p>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='CLEAR_WHITESPACE_LEFT-variable'>
|
||||
CLEAR_WHITESPACE_LEFT
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>'\u0091'</code></pre>
|
||||
<div class='docstring'>
|
||||
<p>Hidden unicode marker to remove left whitespace after template rendering.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</dd>
|
||||
<dt id='CLEAR_WHITESPACE_RIGHT-variable'>
|
||||
CLEAR_WHITESPACE_RIGHT
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>'\u0092'</code></pre>
|
||||
<div class='docstring'>
|
||||
<p>Hidden unicode marker to remove right whitespace after template rendering.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#addChild-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>addChild</b><span>(child)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Add a child node.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getOpener-dynamic'>
|
||||
#
|
||||
(String)
|
||||
<b>getOpener</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get the opening tag for the node.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getCloser-dynamic'>
|
||||
#
|
||||
(String)
|
||||
<b>getCloser</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get the closing tag for the node.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#isPreserved-dynamic'>
|
||||
#
|
||||
(Boolean)
|
||||
<b>isPreserved</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Traverse up the tree to see if a parent node is preserving output space.
|
||||
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#isCommented-dynamic'>
|
||||
#
|
||||
(Boolean)
|
||||
<b>isCommented</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Traverse up the tree to see if a parent node is a comment node.
|
||||
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#markText-dynamic'>
|
||||
#
|
||||
(Object)
|
||||
<b>markText</b><span>(text, escape = false)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Creates a marker for static outputted text.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#markRunningCode-dynamic'>
|
||||
#
|
||||
(Object)
|
||||
<b>markRunningCode</b><span>(code)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Creates a marker for running CoffeeScript code that doesn't generate any output.
|
||||
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#markInsertingCode-dynamic'>
|
||||
#
|
||||
(Object)
|
||||
<b>markInsertingCode</b><span>(code, escape = false, preserve = false, findAndPreserve = false)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Creates a marker for inserting CoffeeScript code that generate an output.
|
||||
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#evaluate-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>evaluate</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Template method that must be implemented by each Node subclass.
|
||||
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#render-dynamic'>
|
||||
#
|
||||
(Array)
|
||||
<b>render</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Render the node and its children.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(expression = '', options = {})</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Constructs a syntax node.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>expression</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the Haml expression to evaluate </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>options</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the node options </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>
|
||||
Options Hash:
|
||||
(options):
|
||||
</h3>
|
||||
<ul class='options'>
|
||||
<li>
|
||||
<span class='name'>parentNode</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt><a href='../class/Node.html'>Node</a></tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the parent node </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>blockLevel</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Number</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the HTML block level </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>codeBlockLevel</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Number</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the CoffeeScript block level </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>escapeHtml</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Boolean</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>whether to escape the rendered HTML or not </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>format</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the template format, either <code>xhtml</code>, <code>html4</code> or <code>html5</code> </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='addChild-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>addChild</b><span>(child)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Add a child node.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>child</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt><a href='../class/Node.html'>Node</a></tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the child node </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getOpener-dynamic'>
|
||||
#
|
||||
(String)
|
||||
<b>getOpener</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get the opening tag for the node.</p><p>This may add a hidden unicode control character for
|
||||
later whitespace processing:</p><ul>
|
||||
<li><code>\u0091</code> Cleanup surrounding whitespace to the left</li>
|
||||
<li><code>\u0092</code> Cleanup surrounding whitespace to the right</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>the opening tag </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getCloser-dynamic'>
|
||||
#
|
||||
(String)
|
||||
<b>getCloser</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get the closing tag for the node.</p><p>This may add a hidden unicode control character for
|
||||
later whitespace processing:</p><ul>
|
||||
<li><code>\u0091</code> Cleanup surrounding whitespace to the left</li>
|
||||
<li><code>\u0092</code> Cleanup surrounding whitespace to the right</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>the closing tag </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='isPreserved-dynamic'>
|
||||
#
|
||||
(Boolean)
|
||||
<b>isPreserved</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Traverse up the tree to see if a parent node
|
||||
is preserving output space.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>Boolean</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>true when preserved </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='isCommented-dynamic'>
|
||||
#
|
||||
(Boolean)
|
||||
<b>isCommented</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Traverse up the tree to see if a parent node
|
||||
is a comment node.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>Boolean</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>true when within a comment </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='markText-dynamic'>
|
||||
#
|
||||
(Object)
|
||||
<b>markText</b><span>(text, escape = false)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Creates a marker for static outputted text.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>html</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the html to output </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>escape</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Boolean</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>whether to escape the generated output </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>the marker </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='markRunningCode-dynamic'>
|
||||
#
|
||||
(Object)
|
||||
<b>markRunningCode</b><span>(code)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Creates a marker for running CoffeeScript
|
||||
code that doesn't generate any output.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>code</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the CoffeeScript code </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>the marker </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='markInsertingCode-dynamic'>
|
||||
#
|
||||
(Object)
|
||||
<b>markInsertingCode</b><span>(code, escape = false, preserve = false, findAndPreserve = false)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Creates a marker for inserting CoffeeScript
|
||||
code that generate an output.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>code</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the CoffeeScript code </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>escape</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Boolean</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>whether to escape the generated output </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>preserve</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Boolean</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>when preserve all newlines </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>findAndPreserve</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Boolean</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>when preserve newlines within preserved tags </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>the marker </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='evaluate-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>evaluate</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<div class='abstract note'>
|
||||
<strong>
|
||||
This
|
||||
method
|
||||
is abstract.
|
||||
</strong>
|
||||
|
||||
</div>
|
||||
<p>Template method that must be implemented by each
|
||||
Node subclass. This evaluates the <code>@expression</code>
|
||||
and save marks the output type on the <code>@opener</code> and
|
||||
<code>@closer</code> attributes if applicable.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='render-dynamic'>
|
||||
#
|
||||
(Array)
|
||||
<b>render</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Render the node and its children.</p><p>Always use <code>@opener</code> and <code>@closer</code> for content checks,
|
||||
but <code>@getOpener()</code> and <code>@getCloser()</code> for outputting,
|
||||
because they may contain whitespace removal control
|
||||
characters.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>Array</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>all markers </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 12, 14 06:33:02 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user