mirror of
https://github.com/morluto/rea.git
synced 2026-11-08 07:46:28 +00:00
fix(javascript): preserve lexical open and exact template semantics
This commit is contained in:
1 parent
fe297e56e8
commit
d6cc9ca3a6
8 files changed
+106
-20
No files matched your search
@@ -148,11 +148,6 @@ const literalValue = (
|
||||
if (node === null || node === undefined) return { found: false };
|
||||
const literal = readExactJavaScriptLiteral(node);
|
||||
if (literal.found) return literal;
|
||||
if (t.isTemplateLiteral(node) && node.expressions.length === 0)
|
||||
return {
|
||||
found: true,
|
||||
value: node.quasis[0]?.value.cooked ?? node.quasis[0]?.value.raw ?? "",
|
||||
};
|
||||
if (
|
||||
t.isUnaryExpression(node, { operator: "-" }) &&
|
||||
t.isNumericLiteral(node.argument)
|
||||
|
||||
Reference in new issue
Block a user