Split JS parser into multiple files (#20880)

Splits up js_parser.zig into multiple files. Also changes visitExprInOut
to use function calls rather than switch

Not ready:

- [ ] P.zig is ~70,000 tokens, still needs to get smaller
- [x] ~~measure zig build time before & after (is it slower?)~~ no
significant impact

---------

Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com>
This commit is contained in:
pfg
2025-08-05 20:52:16 -07:00
committed by GitHub
parent 04883a8bdc
commit a72d74e09a
32 changed files with 24962 additions and 23844 deletions

View File

@@ -14,7 +14,7 @@ const usage = String.raw`
/_____ \____/|__| |__| /_____ \__|__|_| / __/ \____/|__| |__| /____ >
\/ \/ \/|__| \/
Usage: bun scripts/sortImports [options] <files...>
Usage: bun scripts/sort-imports [options] <files...>
Options:
--help Show this help message
@@ -22,7 +22,7 @@ Options:
--keep-unused Don't remove unused imports
Examples:
bun scripts/sortImports src
bun scripts/sort-imports src
`.slice(1);
if (args.includes("--help")) {
console.log(usage);