make check_term aware of module context.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@443 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
8202b025ab
commit
316587c96a
@ -359,7 +359,7 @@ repeat :- '$repeat'.
|
||||
|
||||
'$prepare_term'(G,V,G0,G1, Mod) :-
|
||||
( '$get_value'('$syntaxcheckflag',on) ->
|
||||
'$check_term'(G,V) ; true ),
|
||||
'$check_term'(G,V,Mod) ; true ),
|
||||
'$precompile_term'(G, G0, G1, Mod).
|
||||
|
||||
% process an input clause
|
||||
|
@ -63,22 +63,20 @@ no_style_check([H|T]) :- no_style_check(H), no_style_check(T).
|
||||
'$values'('$syntaxcheckmultiple',O,N).
|
||||
|
||||
|
||||
'$check_term'(T,_) :-
|
||||
'$check_term'(T,_,M) :-
|
||||
'$get_value'('$syntaxcheckdiscontiguous',on),
|
||||
'$current_module'(M),
|
||||
'$xtract_head'(T,M,NM,_,F,A),
|
||||
'$handle_discontiguous'(F,A,NM), fail.
|
||||
'$check_term'(T,_) :-
|
||||
'$check_term'(T,_,M) :-
|
||||
'$get_value'('$syntaxcheckmultiple',on),
|
||||
'$current_module'(M),
|
||||
'$xtract_head'(T,M,NM,_,F,A),
|
||||
'$handle_multiple'(F,A,NM), fail.
|
||||
'$check_term'(T,VL) :-
|
||||
'$check_term'(T,VL,_) :-
|
||||
'$get_value'('$syntaxchecksinglevar',on),
|
||||
( '$chk_binding_vars'(T),
|
||||
'$sv_list'(VL,Sv) ->
|
||||
'$sv_warning'(Sv,T) ), fail.
|
||||
'$check_term'(_,_).
|
||||
'$check_term'(_,_,_).
|
||||
|
||||
'$chk_binding_vars'(V) :- var(V), !, V = '$V'(_).
|
||||
'$chk_binding_vars'('$V'(off)) :- !.
|
||||
|
Reference in New Issue
Block a user