You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li><code>filename</code>: The name of the file.</li>
105
105
<li><code>source</code>: The contents of the file.</li>
106
106
</ul>
107
-
<p>Below is an example that adds a virtual doclet for a function to the source so that it will get parsed and added to the documentation. This might be done to
107
+
<p>Below is an example that adds a virtual comment for a function to the source so that it will get parsed and added to the documentation. This might be done to
108
108
document methods that will be available to users, but might not appear in the source code being documented, such as methods provided by an external superclass:</p>
<li><code>filename</code>: The name of the file.</li>
131
131
<li><code>comment</code>: The text of the JSDoc comment.</li>
132
132
<li><code>lineno</code>: The line number on which the comment was found.</li&
8000
gt;
133
+
<li><code>columnno</code>: The column number on which the comment was found. Available in JSDoc 3.5.0 and later.</li>
133
134
</ul>
134
135
<h4id="event-symbolfound">Event: symbolFound</h4>
135
136
<p>The <code>symbolFound</code> event is fired when the parser comes across a symbol in the code that may need to be documented. For example, the parser fires a
<li><code>comment</code>: The text of the comment associated with the symbol, if any.</li>
141
142
<li><code>id</code>: The unique ID of the symbol.</li>
142
143
<li><code>lineno</code>: The line number on which the symbol was found.</li>
144
+
<li><code>columnno</code>: The column number on which the symbol was found. Available in JSDoc 3.5.0 and later.</li>
143
145
<li><code>range</code>: An array containing the numeric index of the first and last characters in the source file that are associated with the symbol.</li>
144
146
<li><code>astnode</code>: The symbol's node from the abstract syntax tree.</li>
145
147
<li><code>code</code>: Object with detailed information about the code. This object usually contains <code>name</code>,
<p>The event object contains the following properties:</p>
198
202
<ul>
199
203
<li><code>sourcefiles</code>: An array of paths to source files that were parsed.</li>
200
-
<li><code>doclets</code>: An array of doclet objects. See the <ahref="#event-newdoclet">newDoclet event</a> for details about the properties that each doclet
201
-
can contain. <strong>Note</strong>: This property is available in JSDoc 3.2.1 and later.</li>
204
+
<li><code>doclets</code>: An array of doclet objects. See the <ahref="#event-newdoclet"><code>newDoclet</code> event</a> for details about the properties that
205
+
each doclet can contain. Available in JSDoc 3.2.1 and later.</li>
<p>The <code>processingComplete</code> event is fired after JSDoc updates the parse results to reflect inherited and borrowed symbols.</p>
205
209
<p><strong>Note</strong>: This event is fired in JSDoc 3.2.1 and later.</p>
206
210
<p>The event object contains the following properties:</p>
207
211
<ul>
208
-
<li>doclets: An array of doclet objects. See the <ahref="#event-newdoclet">newDoclet event</a> for details about the properties that each doclet can contain.</li>
212
+
<li><code>doclets</code>: An array of doclet objects. See the <ahref="#event-newdoclet"><code>newDoclet</code> event</a> for details about the properties that
213
+
each doclet can contain.</li>
209
214
</ul>
210
215
<h3id="tag-definitions">Tag Definitions</h3>
211
216
<p>Adding tags to the tag dictionary is a mid-level way to affect documentation generation. Before a
<p>The function is called on each node with the following parameters:</p>
278
283
<ul>
279
-
<li><code>node</code>: The AST node. AST nodes are JavaScript objects that use the format defined by the Mozilla Parser API. You can use <ahref="http://esprima.org/demo/parse.html">Esprima's parser demo</a> to see the AST that will be created for your source code.</li>
284
+
<li><code>node</code>: The AST node. AST nodes are JavaScript objects that use the format defined by the <ahref="https://github.com/estree/estree">ESTree
285
+
spec</a>. You can use <ahref="https://astexplorer.net/">AST Explorer</a> to see the AST that will be created for your source code. As of version 3.5.0, JSDoc uses
286
+
the current version of the <ahref="https://github.com/babel/babylon">Babylon</a> parser with all plugins enabled.</li>
280
287
<li><code>e</code>: The event. If the node is one that the parser handles, the event object will already be populated with the same things described in the <code>symbolFound</code> event above. Otherwise, it will be an empty object on which to set various properties.</li>
281
288
<li><code>parser</code>: The JSDoc parser instance.</li>
282
289
<li><code>currentSourceName</code>: The name of the file being parsed.</li>
0 commit comments