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

@@ -1885,7 +1885,6 @@ pub const Resolver = struct {
// this is the magic!
if (global_cache.canUse(any_node_modules_folder) and r.usePackageManager() and esm_ != null) {
if (comptime bun.fast_debug_build_mode and bun.fast_debug_build_cmd != .RunCommand) unreachable;
const esm = esm_.?.withAutoVersion();
load_module_from_cache: {
// If the source directory doesn't have a node_modules directory, we can