- term_innerpos(OFrom, OTo, InnerFrom, InnerTo)
- Contains the inner positions of a term, that exclude comments and some extra
parenthesis.
- fix_termpos(@TermPos, +Options) is det
- Applies fix_subtermpos recursivelly and extends the boundaries of the first
term position from the first comment up to just before the ending dot.
The subterm positions are adjusted recursively according to the Options as
follows:
- fix_subtermpos(@TermPos, Boundaries) is det
- Takes a subterm position, as returned by the subterm_positions option of
read_term/2 and increases its precision, avoiding some minor mistmatches
with the text, that for a refactoring tool is instrumental. This method
also ensures that the minimal required parenthesis enclosing a term are
contained in its scope, widening the positions 1 and 2 of the given term
position specifier. The current implementation is aware of comments and
extra parenthesis, asserting such information in term_innerpos/4 facts.
- To be done
- - This implementation has performance issues, needs optimization.
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- fix_subtermpos(Arg1)
- fix_termpos(Arg1)