From 859e8d22d75e841d40bd7fd8a9c34f095a4506cd Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Mon, 19 Aug 2024 15:33:51 -0400 Subject: [PATCH] nit interpreter: check errors for `-e` and `-` (stdin) Signed-off-by: Jean Privat --- src/nit.nit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nit.nit b/src/nit.nit index 6441b1a1f9..1f44fa2bfe 100644 --- a/src/nit.nit +++ b/src/nit.nit @@ -50,7 +50,6 @@ var mmodules: Array[MModule] if opt_eval.value then var amodule = toolcontext.parse_module(progname) - toolcontext.check_errors var parent = null if opt_loop.value then @@ -62,13 +61,14 @@ if opt_eval.value then end modelbuilder.load_rt_module(parent, amodule, "-") + toolcontext.check_errors mmodules = [amodule.mmodule.as(not null)] else if progname == "-" then var content = stdin.read_all var amodule = toolcontext.parse_module(content) - toolcontext.check_errors modelbuilder.load_rt_module(null, amodule, "-") + toolcontext.check_errors mmodules = [amodule.mmodule.as(not null)] else mmodules = modelbuilder.parse([progname])