r108018 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108017‎ | r108018 | r108019 >
Date:12:28, 4 January 2012
Author:gwicke
Status:deferred
Tags:
Comment:
Fix up constructors in EventEmitter inheritance and tweak a few more comments.
Modified paths:
  • /trunk/extensions/VisualEditor/modules/parser/ext.core.QuoteTransformer.js (modified) (history)
  • /trunk/extensions/VisualEditor/modules/parser/mediawiki.DOMPostProcessor.js (modified) (history)
  • /trunk/extensions/VisualEditor/modules/parser/mediawiki.HTML5TreeBuilder.node.js (modified) (history)
  • /trunk/extensions/VisualEditor/modules/parser/mediawiki.TokenTransformDispatcher.js (modified) (history)
  • /trunk/extensions/VisualEditor/modules/parser/mediawiki.parser.js (modified) (history)
  • /trunk/extensions/VisualEditor/modules/parser/mediawiki.tokenizer.peg.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/parser/mediawiki.TokenTransformDispatcher.js
@@ -50,6 +50,7 @@
5151
5252 // Inherit from EventEmitter
5353 TokenTransformDispatcher.prototype = new events.EventEmitter();
 54+TokenTransformDispatcher.prototype.constructor = TokenTransformDispatcher;
5455
5556 /**
5657 * Register to a token source, normally the tokenizer.
@@ -187,6 +188,7 @@
188189
189190 /* Call all transformers on a tag.
190191 *
 192+ * @method
191193 * @param {Object} The current token.
192194 * @param {Function} Completion callback for async processing.
193195 * @param {Number} Rank of phase end, both key for transforms and rank for
@@ -239,6 +241,7 @@
240242
241243 /* Call all transformers on non-tag token types.
242244 *
 245+ * @method
243246 * @param {Object} The current token.
244247 * @param {Function} Completion callback for async processing.
245248 * @param {Number} Rank of phase end, both key for transforms and rank for
@@ -514,6 +517,7 @@
515518 /**
516519 * Curry a parentCB with the object and reference.
517520 *
 521+ * @method
518522 * @param {Object} TokenAccumulator
519523 * @param {misc} Reference / key for callback
520524 * @returns {Function}
Index: trunk/extensions/VisualEditor/modules/parser/ext.core.QuoteTransformer.js
@@ -201,7 +201,6 @@
202202 this.dispatcher.removeTransform( this.anyRank, 'any' );
203203
204204 return res;
205 -
206205 };
207206
208207 // Convert a bold token to italic to balance an uneven number of both bold and
Index: trunk/extensions/VisualEditor/modules/parser/mediawiki.HTML5TreeBuilder.node.js
@@ -20,7 +20,9 @@
2121 this.processToken({type: 'TAG', name: 'body'});
2222 };
2323
 24+// Inherit from EventEmitter
2425 FauxHTML5.TreeBuilder.prototype = new events.EventEmitter();
 26+FauxHTML5.TreeBuilder.prototype.constructor = FauxHTML5.TreeBuilder;
2527
2628 /**
2729 * Register for (token) 'chunk' and 'end' events from a token emitter,
Index: trunk/extensions/VisualEditor/modules/parser/mediawiki.tokenizer.peg.js
@@ -19,6 +19,7 @@
2020
2121 // Inherit from EventEmitter
2222 PegTokenizer.prototype = new events.EventEmitter();
 23+PegTokenizer.prototype.constructor = PegTokenizer;
2324
2425 PegTokenizer.src = false;
2526
Index: trunk/extensions/VisualEditor/modules/parser/mediawiki.DOMPostProcessor.js
@@ -83,6 +83,7 @@
8484
8585 // Inherit from EventEmitter
8686 DOMPostProcessor.prototype = new events.EventEmitter();
 87+DOMPostProcessor.prototype.constructor = DOMPostProcessor;
8788
8889 DOMPostProcessor.prototype.doPostProcess = function ( document ) {
8990 for(var i = 0; i < this.processors.length; i++) {
Index: trunk/extensions/VisualEditor/modules/parser/mediawiki.parser.js
@@ -66,7 +66,7 @@
6767
6868 /**
6969 * Conversion from HTML DOM to WikiDOM. This is not needed if plain HTML
70 - * DOM output is needed, so it should only be registered to the
 70+ * DOM output is desired, so it should only be registered to the
7171 * DOMPostProcessor 'document' event if WikiDom output is requested. We
7272 * could emit events for 'dom', 'wikidom', 'html' and so on, but only
7373 * actually set up the needed pipeline stages if a listener is registered.

Status & tagging log