Sha256: 6967418da6802ada2e389d953288eb071b78c50a8dc4ed6822629b32a8bfd16e

Contents?: true

Size: 1.9 KB

Versions: 67

Compression:

Stored size: 1.9 KB

Contents

{"version":3,"names":["TaggedTemplateExpression","node","print","tag","typeParameters","quasi","TemplateElement","Error","TemplateLiteral","quasis","partRaw","i","length","value","raw","token","expressions"],"sources":["../../src/generators/template-literals.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport type * as t from \"@babel/types\";\n\nexport function TaggedTemplateExpression(\n  this: Printer,\n  node: t.TaggedTemplateExpression,\n) {\n  this.print(node.tag);\n  this.print(node.typeParameters); // TS\n  this.print(node.quasi);\n}\n\nexport function TemplateElement(this: Printer) {\n  throw new Error(\"TemplateElement printing is handled in TemplateLiteral\");\n}\n\nexport function TemplateLiteral(this: Printer, node: t.TemplateLiteral) {\n  const quasis = node.quasis;\n\n  let partRaw = \"`\";\n\n  for (let i = 0; i < quasis.length; i++) {\n    partRaw += quasis[i].value.raw;\n\n    if (i + 1 < quasis.length) {\n      this.token(partRaw + \"${\", true);\n      this.print(node.expressions[i]);\n      partRaw = \"}\";\n    }\n  }\n\n  this.token(partRaw + \"`\", true);\n}\n"],"mappings":";;;;;;;;AAGO,SAASA,wBAAwBA,CAEtCC,IAAgC,EAChC;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,GAAG,CAAC;EACpB,IAAI,CAACD,KAAK,CAACD,IAAI,CAACG,cAAc,CAAC;EAC/B,IAAI,CAACF,KAAK,CAACD,IAAI,CAACI,KAAK,CAAC;AACxB;AAEO,SAASC,eAAeA,CAAA,EAAgB;EAC7C,MAAM,IAAIC,KAAK,CAAC,wDAAwD,CAAC;AAC3E;AAEO,SAASC,eAAeA,CAAgBP,IAAuB,EAAE;EACtE,MAAMQ,MAAM,GAAGR,IAAI,CAACQ,MAAM;EAE1B,IAAIC,OAAO,GAAG,GAAG;EAEjB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,MAAM,CAACG,MAAM,EAAED,CAAC,EAAE,EAAE;IACtCD,OAAO,IAAID,MAAM,CAACE,CAAC,CAAC,CAACE,KAAK,CAACC,GAAG;IAE9B,IAAIH,CAAC,GAAG,CAAC,GAAGF,MAAM,CAACG,MAAM,EAAE;MACzB,IAAI,CAACG,KAAK,CAACL,OAAO,GAAG,IAAI,EAAE,IAAI,CAAC;MAChC,IAAI,CAACR,KAAK,CAACD,IAAI,CAACe,WAAW,CAACL,CAAC,CAAC,CAAC;MAC/BD,OAAO,GAAG,GAAG;IACf;EACF;EAEA,IAAI,CAACK,KAAK,CAACL,OAAO,GAAG,GAAG,EAAE,IAAI,CAAC;AACjC","ignoreList":[]}

Version data entries

67 entries across 7 versions & 1 rubygems

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