Skip to content

Commit

Permalink
support --exec=interp
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSPoon committed Dec 24, 2024
1 parent 000f4b7 commit 2fba6d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion prolog/metta_lang/metta_interp.pl
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@
all_option_value_name_default_type_help('repl', auto, [false, true, auto], "Enter REPL mode (auto means true unless a file argument was supplied)", 'Execution and Control').
all_option_value_name_default_type_help('prolog', false, [false, true], "Enable or disable Prolog REPL mode", 'Compatibility and Modes').
option_value_name_default_type_help('devel', false, [false, true], "Developer mode", 'Compatibility and Modes').
all_option_value_name_default_type_help('exec', noskip, [noskip, skip], "Controls execution during script loading: noskip or skip (don't-skip-include/binds) vs skip-all", 'Execution and Control').
all_option_value_name_default_type_help('exec', noskip, [noskip, skip, interp], "Controls execution during script loading: noskip or skip (don't-skip-include/binds) vs skip-all", 'Execution and Control').

% Resource Limits
option_value_name_default_type_help('stack-max', 500, [inf,1000,10_000], "Maximum stack depth allowed during execution", 'Resource Limits').
Expand Down Expand Up @@ -1664,6 +1664,7 @@
%ignore(discover_head(Self,Load,PredDecl)),
color_g_mesg_ok('#ffa505',metta_anew(Load,Src,metta_atom(Self,PredDecl))).

never_compile(_):- option_value('exec',interp),!.
never_compile(X):- always_exec(X).

always_exec(W):- var(W),!,fail.
Expand Down
2 changes: 1 addition & 1 deletion prolog/metta_lang/metta_printer.pl
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
% Do not print if silent loading mode is enabled.
pnotrace(silent_loading), !.

print_pl_source0(P) :-!,
print_pl_source0(P) :- fail,!,
format('~N'),
print_tree(P),
format('~N'), !.
Expand Down

0 comments on commit 2fba6d5

Please sign in to comment.