From 7eba3229fe8ed0f7ef01adbc5435ee061ec705cd Mon Sep 17 00:00:00 2001 From: jhmaster2000 <32803471+jhmaster2000@users.noreply.github.com> Date: Thu, 7 Sep 2023 00:32:39 -0300 Subject: initial bun repl revision --- src/cli.zig | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/cli.zig') diff --git a/src/cli.zig b/src/cli.zig index c68297baa..82ca04228 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -1099,6 +1099,7 @@ pub const Command = struct { RootCommandMatcher.case("link") => .LinkCommand, RootCommandMatcher.case("unlink") => .UnlinkCommand, RootCommandMatcher.case("x") => .BunxCommand, + RootCommandMatcher.case("repl") => .ReplCommand, RootCommandMatcher.case("i"), RootCommandMatcher.case("install") => brk: { for (args_iter.buf) |arg| { @@ -1174,6 +1175,7 @@ pub const Command = struct { const UpgradeCommand = @import("./cli/upgrade_command.zig").UpgradeCommand; const BunxCommand = @import("./cli/bunx_command.zig").BunxCommand; + const ReplCommand = @import("./cli/repl_command.zig").ReplCommand; if (comptime bun.fast_debug_build_mode) { // _ = AddCommand; @@ -1276,6 +1278,13 @@ pub const Command = struct { try BunxCommand.exec(ctx); return; }, + .ReplCommand => { + if (comptime bun.fast_debug_build_mode and bun.fast_debug_build_cmd != .ReplCommand) unreachable; + const ctx = try Command.Context.create(allocator, log, .ReplCommand); + + try ReplCommand.exec(ctx); + return; + }, .RemoveCommand => { if (comptime bun.fast_debug_build_mode and bun.fast_debug_build_cmd != .RemoveCommand) unreachable; const ctx = try Command.Context.create(allocator, log, .RemoveCommand); @@ -1641,6 +1650,7 @@ pub const Command = struct { InstallCompletionsCommand, LinkCommand, PackageManagerCommand, + ReplCommand, RemoveCommand, RunCommand, TestCommand, -- cgit v1.2.3