mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-02 18:11:04 +08:00
This Cl is the output of the following command: npm run install-deps -- dedupe This is an attempt to reduce the amount of disk usage of the node_modules folder. For more information, see https://github.com/eslint/eslint/issues/14098 DISABLE_THIRD_PARTY_CHECK=NPM dedupe R=jacktfranklin@chromium.org Bug: none Change-Id: If482ec6cf6ad1936aab4a7b0ff3e61bf5ea98a8f Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2703961 Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
33 lines
864 B
JavaScript
33 lines
864 B
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.TaggedTemplateExpression = TaggedTemplateExpression;
|
|
exports.TemplateElement = TemplateElement;
|
|
exports.TemplateLiteral = TemplateLiteral;
|
|
|
|
function TaggedTemplateExpression(node) {
|
|
this.print(node.tag, node);
|
|
this.print(node.typeParameters, node);
|
|
this.print(node.quasi, node);
|
|
}
|
|
|
|
function TemplateElement(node, parent) {
|
|
const isFirst = parent.quasis[0] === node;
|
|
const isLast = parent.quasis[parent.quasis.length - 1] === node;
|
|
const value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");
|
|
this.token(value);
|
|
}
|
|
|
|
function TemplateLiteral(node) {
|
|
const quasis = node.quasis;
|
|
|
|
for (let i = 0; i < quasis.length; i++) {
|
|
this.print(quasis[i], node);
|
|
|
|
if (i + 1 < quasis.length) {
|
|
this.print(node.expressions[i], node);
|
|
}
|
|
}
|
|
} |