clean up loose template literals
This commit is contained in:
parent
6b836de306
commit
e258b85420
@ -42,7 +42,8 @@ File.helpers = [
|
|||||||
|
|
||||||
File.excludeHelpersFromRuntime = [
|
File.excludeHelpersFromRuntime = [
|
||||||
"async-to-generator",
|
"async-to-generator",
|
||||||
"typeof"
|
"typeof",
|
||||||
|
"tagged-template-literal-loose"
|
||||||
];
|
];
|
||||||
|
|
||||||
File.normaliseOptions = function (opts) {
|
File.normaliseOptions = function (opts) {
|
||||||
|
|||||||
@ -20,11 +20,10 @@ exports.TaggedTemplateExpression = function (node, parent, file) {
|
|||||||
strings = t.arrayExpression(strings);
|
strings = t.arrayExpression(strings);
|
||||||
raw = t.arrayExpression(raw);
|
raw = t.arrayExpression(raw);
|
||||||
|
|
||||||
var template = file.isLoose("templateLiterals") ?
|
var templateName = "tagged-template-literal";
|
||||||
"tagged-template-literal-loose" :
|
if (file.isLoose("templateLiterals")) templateName += "-loose";
|
||||||
"tagged-template-literal";
|
args.push(t.callExpression(file.addHelper(templateName), [strings, raw]));
|
||||||
|
|
||||||
args.push(t.callExpression(file.addHelper(template), [strings, raw]));
|
|
||||||
args = args.concat(quasi.expressions);
|
args = args.concat(quasi.expressions);
|
||||||
|
|
||||||
return t.callExpression(node.tag, args);
|
return t.callExpression(node.tag, args);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user