diff options
m--------- | Dalos-modules | 0 | ||||
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | src/Dalos-cli.cc | 17 |
3 files changed, 18 insertions, 0 deletions
diff --git a/Dalos-modules b/Dalos-modules -Subproject d625e8c12de02e2c39d687b735e6e8d5a3fd086 +Subproject 3c1040007a354ce55bd964beabac94b67c1f6fc @@ -33,6 +33,7 @@ DALOS_CLI_SOURCES = \ Dalos-cli.cc \ \ Readline.cc \ +LuaLoad.cc \ ALL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(DALOS_CLI_SOURCES)))) ALL_DEPS = $(addsuffix .dep, $(notdir $(basename $(DALOS_CLI_SOURCES)))) diff --git a/src/Dalos-cli.cc b/src/Dalos-cli.cc index acc7ea3..5c7cc8a 100644 --- a/src/Dalos-cli.cc +++ b/src/Dalos-cli.cc @@ -5,6 +5,7 @@ #include <Input.h> #include <BStdIO.h> #include "BReadline.h" +#include "LuaLoad.h" using namespace Balau; @@ -36,6 +37,16 @@ static void showhelp(const char * binname, bool longhelp) { ); } +namespace { + +class DalosInit : public LuaExecCell { + virtual void run(Lua & L) override { + registerLuaLoad(L); + } +}; + +}; + void MainTask::Do() { std::list<String> execs; bool interactive = false; @@ -69,6 +80,12 @@ void MainTask::Do() { } } + { + DalosInit dalosInit; + dalosInit.exec(luaMainTask); + dalosInit.throwError(); + } + while (optind < argc) { todo = true; IO<Input> file(new Input(argv[optind++])); |