sweep_replace_stream(Stream, FileName, Module, BodyIndent, Final, TemplateGoal, RepVarNames, Tail).
-
%! sweep_replace_term(Pos, Term, FileName, Module, BodyIndent, CurrentIndent, Precedence, State, Final, TemplateGoal, RepVarNames, Result) is nondet.
sweep_replace_term(Pos, Term, FileName, Module, BodyIndent, CurrentIndent, Precedence, State, Final, TemplateGoal, RepVarNames, Result) :-
asserta(sweep_match_replacement(New0))
),
retract(sweep_match_replacement(New)),
- arg(1, Pos, Beg),
- arg(2, Pos, End).
+ pos_bounds(Pos, Beg, End).
list_tail([_|T0], T) :- nonvar(T0), T0 = [_|_], !, list_tail(T0, T).
list_tail([_|T], T).
sweep_terms_at_point_(SubPos, Start, Point, Beg, End) :-
SubPos \= parentheses_term_position(_, _, _),
- arg(1, SubPos, Beg0),
- arg(2, SubPos, End0),
+ pos_bounds(SubPos, Beg0, End0),
Beg0 =< Point,
Point =< End0,
Beg is Beg0 + Start,
sweep_terms_at_point_(quasi_quotation_position(_, _, _, SubPos, _), Start, Point, Beg, End) :-
sweep_terms_at_point_(SubPos, Start, Point, Beg, End).
+pos_bounds(SubPos, Beg0, End0) :-
+ arg(1, SubPos, Beg0),
+ arg(2, SubPos, End0).
+
sweep_predicate_dependencies([To0|From0], Deps) :-
atom_string(To, To0),
atom_string(From, From0),