This module defines reusable code to colourise Prolog source.
- To be done
- - : The one-term version
- prolog_colourise_stream(+Stream, +SourceID, :ColourItem) is det
- prolog_colourise_stream(+Stream, +SourceID, :ColourItem, +Opts) is det
- Determine colour fragments for the data on Stream. SourceID is
the canonical identifier of the input as known to the
cross-referencer, i.e., as created using
ColourItem is a closure that is called for each identified
fragment with three additional arguments:
- The syntactical category
- Start position (character offset) of the fragment
- Length of the fragment (in characters).
- Provide an initial list of additional operators.
- prolog_colourise_query(+Query:string, +SourceId, :ColourItem)
- Colourise a query, to be executed in the context of SourceId.
|SourceId||- Execute Query in the context of
the cross-referenced environment SourceID.|
- prolog_colourise_term(+Stream, +SourceID, :ColourItem, +Options)
- Colourise the next term on Stream. Unlike
prolog_colourise_stream/3, this predicate assumes it is reading
a single term rather than the entire stream. This implies that
it cannot adjust syntax according to directives that precede it.
- Return complete term-layout. If an error is read, this is a
error_position(StartClause, EndClause, ErrorPos)
- vararg_goal_classification(+Name, +Arity, -Class) is semidet[multifile]
- Multifile hookable classification for vararg predicates.
- syntax_colour(?Class, ?Attributes) is nondet
- True when a range classified Class must be coloured using
Attributes. Attributes is a list of:
Attributes may be the empty list. This is used for cases where
-for example- a menu is associated with the fragment. If
syntax_colour/2 fails, no fragment is created for the region.
The following predicates are exported, but not or incorrectly documented.
- syntax_message(Arg1, Arg2, Arg3)
- prolog_colourise_stream(Arg1, Arg2, Arg3, Arg4)