add comment explaining what the modules-split transformer does

This commit is contained in:
Sebastian McKenzie
2015-01-28 18:40:33 +11:00
parent a64e040ac7
commit dfc6f1d1cf

View File

@@ -1,5 +1,11 @@
"use strict";
// in this transformer we have to split up classes and function declarations
// from their exports. why? because sometimes we need to replace classes with
// nodes that aren't allowed in the same contexts. also, if you're exporting
// a generator function as a default then regenerator will destroy the export
// declaration and leave a variable declaration in it's place... yeah, handy.
var t = require("../../../types");
exports.ExportDeclaration = function (node, parent, scope) {