mirror of
https://github.com/morluto/rea.git
synced 2026-10-27 18:05:45 +00:00
refactor(javascript): normalize erased expression syntax once
This commit is contained in:
1 parent
cfb12e47dc
commit
b628bba1fa
17 files changed
+313
-205
No files matched your search
@@ -14,6 +14,7 @@ import type {
|
||||
import {
|
||||
readExactJavaScriptLiteral,
|
||||
semanticStaticPropertyName,
|
||||
unwrapJavaScriptExpression,
|
||||
} from "./javascriptAstValues.js";
|
||||
import { compareUnicodeCodePoints } from "../unicodeCodePointOrder.js";
|
||||
|
||||
@@ -100,8 +101,8 @@ const findChunkRuntime = (node: t.Node): string | undefined => {
|
||||
pending.push(current.right, current.left);
|
||||
continue;
|
||||
}
|
||||
if (t.isParenthesizedExpression(current) || t.isTSAsExpression(current))
|
||||
pending.push(current.expression);
|
||||
const unwrapped = unwrapJavaScriptExpression(current).node;
|
||||
if (unwrapped !== current) pending.push(unwrapped);
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user