File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,17 @@ var literalTypes = {
1717 'BooleanLiteralTypeAnnotation' : 'BooleanLiteral'
1818} ;
1919
20+ /**
21+ * Babel parses Flow annotations in JavaScript into AST nodes. documentation.js uses
22+ * Babel to parse JavaScript. This method restructures those Babel-generated
23+ * objects into objects that fit the output of Doctrine, the module we use
24+ * to parse JSDoc annotations. This lets us use Flow annotations _as_
25+ * JSDoc annotations.
26+ *
27+ * @private
28+ * @param {Object } type babel-parsed flow type
29+ * @returns {Object } doctrine compatible type
30+ */
2031function flowDoctrine ( type ) {
2132
2233 if ( type . type in namedTypes ) {
Original file line number Diff line number Diff line change 11'use strict' ;
22
3+ /**
4+ * Create a tokenizer method for Remark, our Markdown processor,
5+ * that is able to parse JSDoc inline tokens
6+ *
7+ * @private
8+ * @param {string } type the destination type of the parsed objects
9+ * @param {RegExp } regex regular expression for extracting content
10+ * from text
11+ * @returns {Function } tokenizer
12+ */
313function makeTokenizer ( type , regex ) {
414 var tokenizer = function ( eat , value , silent ) {
515 var match = regex . exec ( value ) ;
Original file line number Diff line number Diff line change @@ -100,6 +100,12 @@ Server.prototype.stop = function (callback) {
100100 } . bind ( this ) ) ;
101101} ;
102102
103+ /**
104+ * A placeholder method that will be called instead of `callback` if
105+ * callback is omitted for the server control methods
106+ * @private
107+ * @returns {undefined } doesn't return anything
108+ */
103109function noop ( ) { }
104110
105111module . exports = Server ;
You can’t perform that action at this time.
0 commit comments