Sha256: 127391ec0560e8b1ab8d21263078af292553a2d12383c9e95153053d54d72b63

Contents?: true

Size: 855 Bytes

Versions: 67

Compression:

Stored size: 855 Bytes

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.TaggedTemplateExpression = TaggedTemplateExpression;
exports.TemplateElement = TemplateElement;
exports.TemplateLiteral = TemplateLiteral;
function TaggedTemplateExpression(node) {
  this.print(node.tag);
  this.print(node.typeParameters);
  this.print(node.quasi);
}
function TemplateElement() {
  throw new Error("TemplateElement printing is handled in TemplateLiteral");
}
function TemplateLiteral(node) {
  const quasis = node.quasis;
  let partRaw = "`";
  for (let i = 0; i < quasis.length; i++) {
    partRaw += quasis[i].value.raw;
    if (i + 1 < quasis.length) {
      this.token(partRaw + "${", true);
      this.print(node.expressions[i]);
      partRaw = "}";
    }
  }
  this.token(partRaw + "`", true);
}

//# sourceMappingURL=template-literals.js.map

Version data entries

67 entries across 7 versions & 1 rubygems

Version Path
immosquare-cleaner-0.1.45 node_modules/@babel/plugin-transform-modules-systemjs/node_modules/@babel/traverse/node_modules/@babel/generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.45 node_modules/@babel/plugin-transform-function-name/node_modules/@babel/traverse/node_modules/@babel/generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.45 node_modules/@babel/plugin-transform-classes/node_modules/@babel/traverse/node_modules/@babel/generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.45 node_modules/@babel/plugin-transform-async-generator-functions/node_modules/@babel/traverse/node_modules/@babel/generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.45 node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/node_modules/@babel/traverse/node_modules/@babel/generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.45 node_modules/@babel/helper-wrap-function/node_modules/@babel/traverse/node_modules/@babel/generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.45 node_modules/@babel/helper-builder-binary-assignment-operator-visitor/node_modules/@babel/traverse/node_modules/@babel/generator/lib/generators/template-literals.js