source: imaps-frontend/node_modules/@babel/generator/lib/generators/template-literals.js

main
Last change on this file was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago

Pred finalna verzija

  • Property mode set to 100644
File size: 1007 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.TaggedTemplateExpression = TaggedTemplateExpression;
7exports.TemplateElement = TemplateElement;
8exports.TemplateLiteral = TemplateLiteral;
9function TaggedTemplateExpression(node) {
10 this.print(node.tag);
11 this.print(node.typeParameters);
12 this.print(node.quasi);
13}
14function TemplateElement() {
15 throw new Error("TemplateElement printing is handled in TemplateLiteral");
16}
17function TemplateLiteral(node) {
18 const quasis = node.quasis;
19 let partRaw = "`";
20 for (let i = 0; i < quasis.length; i++) {
21 partRaw += quasis[i].value.raw;
22 if (i + 1 < quasis.length) {
23 this.token(partRaw + "${", true);
24 this.print(node.expressions[i]);
25 partRaw = "}";
26 if (this.tokenMap) {
27 const token = this.tokenMap.findMatching(node, "}", i);
28 if (token) this._catchUpTo(token.loc.start);
29 }
30 }
31 }
32 this.token(partRaw + "`", true);
33}
34
35//# sourceMappingURL=template-literals.js.map
Note: See TracBrowser for help on using the repository browser.