node_modules/babel-generator/lib/generators/base.js in babel-schmooze-sprockets-0.1.2 vs node_modules/babel-generator/lib/generators/base.js in babel-schmooze-sprockets-0.1.3
- old
+ new
@@ -1,14 +1,22 @@
-/*istanbul ignore next*/"use strict";
+"use strict";
exports.__esModule = true;
exports.File = File;
-/*istanbul ignore next*/exports.Program = Program;
-/*istanbul ignore next*/exports.BlockStatement = BlockStatement;
-/*istanbul ignore next*/exports.Noop = Noop;
-/*istanbul ignore next*/exports.Directive = Directive;
-/*istanbul ignore next*/exports.DirectiveLiteral = DirectiveLiteral;
+exports.Program = Program;
+exports.BlockStatement = BlockStatement;
+exports.Noop = Noop;
+exports.Directive = Directive;
+
+var _types = require("./types");
+
+Object.defineProperty(exports, "DirectiveLiteral", {
+ enumerable: true,
+ get: function get() {
+ return _types.StringLiteral;
+ }
+});
function File(node) {
this.print(node.program, node);
}
function Program(node) {
@@ -19,11 +27,11 @@
this.printSequence(node.body, node);
}
function BlockStatement(node) {
- this.push("{");
+ this.token("{");
this.printInnerComments(node);
if (node.body.length) {
this.newline();
this.printSequence(node.directives, node, { indent: true });
@@ -34,19 +42,15 @@
this.source("end", node.loc);
this.rightBrace();
} else {
this.source("end", node.loc);
- this.push("}");
+ this.token("}");
}
}
function Noop() {}
function Directive(node) {
this.print(node.value, node);
this.semicolon();
-}
-
-function DirectiveLiteral(node) {
- this.push(this._stringLiteral(node.value));
}
\ No newline at end of file