mirror of
https://github.com/morluto/rea.git
synced 2026-10-21 21:32:26 -05:00
fix(javascript): avoid positive-zero evidence for signed zero
This commit is contained in:
1 parent
2bd7de6f8c
commit
9055bd695b
4 files changed
+70
-1
No files matched your search
@@ -171,7 +171,10 @@ const evaluateExpression = (
|
||||
if (context.expressionDepth > SEMANTIC_EXPRESSION_DEPTH_LIMIT)
|
||||
return semanticResourceLimitUnknown("expression-depth");
|
||||
const literal = readExactJavaScriptLiteral(node);
|
||||
if (literal.found) return { status: "literal", value: literal.value };
|
||||
if (literal.found)
|
||||
return typeof literal.value === "number"
|
||||
? primitiveSet([literal.value])
|
||||
: { status: "literal", value: literal.value };
|
||||
if (t.isIdentifier(node)) {
|
||||
const binding = resolveSemanticBindingState(context.state, node, node.name);
|
||||
return binding === undefined
|
||||
|
||||
Reference in new issue
Block a user