prolog:comment_hook(+Comments,
+Pos, +Term, +VarNames)comments(Comments). If the list of comments returned by
read_term/2
is not empty it calls this comment hook with the following arguments.
- Comments is the non-empty list of comments. Each comment is a pair Position-String, where String is a string object (see section 5.2) that contains the comment including delimiters. Consecutive line comments are returned as a single comment.
- Pos is a stream-position term that describes the starting position of Term
- Term is the term read.
- VarNames is a list Name=Var for the
named variables of Term if the variable names are requested
using the option
variable_names(Bindings)of read_clause/3 andotherwise. This allows the hook to relate comments to the argument names of Term.[]
This hook is exploited by the documentation system. See stream_position_data/3. See also read_term/3.