nitc :: AnsiHighlightVisitor :: result=
The produced highlightingnitc $ AnsiHighlightVisitor :: SELF
Type of this instance, automatically specialized in every classnitc $ AnsiHighlightVisitor :: do_highlight
Low-level highlighting between 2 tokensnitc :: AbstractHighlightVisitor :: _first_line
The first line to generate, null if start at the first linenitc :: AbstractHighlightVisitor :: _include_loose_tokens
When highlighting a node, also consider the loose tokens around it.nitc :: AbstractHighlightVisitor :: _include_whole_lines
When highlighting a node, the first and the last lines are fully included.nitc :: AbstractHighlightVisitor :: _last_line
The last line to generate, null if finish at the last linenitc :: AbstractHighlightVisitor :: _show_messages
When highlighting a node, show its messages (errors, warnings), if any.core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
nitc :: AbstractHighlightVisitor :: do_highlight
Low-level highlighting between 2 tokensnitc :: AbstractHighlightVisitor :: first_line
The first line to generate, null if start at the first linenitc :: AbstractHighlightVisitor :: first_line=
The first line to generate, null if start at the first linenitc :: AbstractHighlightVisitor :: highlight_node
Highlight a AST element.nitc :: AbstractHighlightVisitor :: highlight_source
Highlight a full lexed source file.nitc :: AbstractHighlightVisitor :: include_loose_tokens
When highlighting a node, also consider the loose tokens around it.nitc :: AbstractHighlightVisitor :: include_loose_tokens=
When highlighting a node, also consider the loose tokens around it.nitc :: AbstractHighlightVisitor :: include_whole_lines
When highlighting a node, the first and the last lines are fully included.nitc :: AbstractHighlightVisitor :: include_whole_lines=
When highlighting a node, the first and the last lines are fully included.core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
nitc :: AbstractHighlightVisitor :: last_line
The last line to generate, null if finish at the last linenitc :: AbstractHighlightVisitor :: last_line=
The last line to generate, null if finish at the last linecore :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: AnsiHighlightVisitor :: result=
The produced highlightingnitc :: AbstractHighlightVisitor :: show_messages
When highlighting a node, show its messages (errors, warnings), if any.nitc :: AbstractHighlightVisitor :: show_messages=
When highlighting a node, show its messages (errors, warnings), if any.nitc :: AbstractHighlightVisitor
Visitor used to produce a HTML tree based on a AST on aSource
# Text-based highlighter that use ANSI escape sequence for colors
class AnsiHighlightVisitor
super AbstractHighlightVisitor
# The produced highlighting
var result = new Template
redef fun do_highlight(f, l)
do
var c
c = f
while c != null do
if c != f then result.add(c.blank_before)
result.add c.ansi_colored
if c == l then
c = null
else
c = c.next_token
end
end
end
end
src/highlight.nit:114,1--136,3