checker should be called after preprocessing (obs from Roberto Bagnara).
This commit is contained in:
parent
51e9cb14a7
commit
7c2c3febe5
11
pl/boot.yap
11
pl/boot.yap
@ -461,9 +461,14 @@ true :- true.
|
|||||||
'$$compile'(G1, G0, N, HeadMod).
|
'$$compile'(G1, G0, N, HeadMod).
|
||||||
|
|
||||||
'$prepare_term'(G, V, Pos, G0, G1, BodyMod, SourceMod, Source) :-
|
'$prepare_term'(G, V, Pos, G0, G1, BodyMod, SourceMod, Source) :-
|
||||||
( get_value('$syntaxcheckflag',on) ->
|
'$precompile_term'(G, G0, G1, BodyMod, SourceMod),
|
||||||
'$check_term'(Source, V, Pos, BodyMod) ; true ),
|
(
|
||||||
'$precompile_term'(G, G0, G1, BodyMod, SourceMod).
|
get_value('$syntaxcheckflag',on)
|
||||||
|
->
|
||||||
|
'$check_term'(G0, V, Pos, Source, BodyMod)
|
||||||
|
;
|
||||||
|
true
|
||||||
|
).
|
||||||
|
|
||||||
% process an input clause
|
% process an input clause
|
||||||
'$$compile'(G, G0, L, Mod) :-
|
'$$compile'(G, G0, L, Mod) :-
|
||||||
|
@ -120,20 +120,22 @@ no_style_check([H|T]) :- no_style_check(H), no_style_check(T).
|
|||||||
'$values'('$syntaxcheckmultiple',O,N).
|
'$values'('$syntaxcheckmultiple',O,N).
|
||||||
|
|
||||||
|
|
||||||
'$check_term'(T,_,P,M) :-
|
'$check_term'(T,_,P,_Source,M) :-
|
||||||
get_value('$syntaxcheckdiscontiguous',on),
|
get_value('$syntaxcheckdiscontiguous',on),
|
||||||
'$xtract_head'(T,M,NM,_,F,A),
|
'$xtract_head'(T,M,NM,_,F,A),
|
||||||
'$handle_discontiguous'(F,A,NM), fail.
|
'$handle_discontiguous'(F,A,NM), fail.
|
||||||
'$check_term'(T,_,P,M) :-
|
'$check_term'(T,_,P,_Source,M) :-
|
||||||
get_value('$syntaxcheckmultiple',on),
|
get_value('$syntaxcheckmultiple',on),
|
||||||
'$xtract_head'(T,M,NM,_,F,A),
|
'$xtract_head'(T,M,NM,_,F,A),
|
||||||
'$handle_multiple'(F,A,NM), fail.
|
'$handle_multiple'(F,A,NM), fail.
|
||||||
'$check_term'(T,VL,P,_) :-
|
'$check_term'(T,VL,P,_Source,_) :-
|
||||||
get_value('$syntaxchecksinglevar',on),
|
get_value('$syntaxchecksinglevar',on),
|
||||||
( '$chk_binding_vars'(T),
|
( '$chk_binding_vars'(T),
|
||||||
'$sv_list'(VL,Sv) ->
|
'$sv_list'(VL,Sv)
|
||||||
'$sv_warning'(Sv,T) ), fail.
|
->
|
||||||
'$check_term'(_,_,_,_).
|
'$sv_warning'(Sv,T)
|
||||||
|
), fail.
|
||||||
|
'$check_term'(_,_,_,_,_).
|
||||||
|
|
||||||
'$chk_binding_vars'(V) :- var(V), !, V = '$V'(_).
|
'$chk_binding_vars'(V) :- var(V), !, V = '$V'(_).
|
||||||
'$chk_binding_vars'('$V'(off)) :- !.
|
'$chk_binding_vars'('$V'(off)) :- !.
|
||||||
|
Reference in New Issue
Block a user