Handbook
Glossary
highlight. ( obj -- )
Vocabulary
xmode
.
highlight
Inputs
obj
a
string
Outputs
None
Word description
Highlight and print code from the specified
word
or path (with a mode determined using the file extension).
Definition
IN:
xmode.highlight
GENERIC:
highlight.
( obj -- )
Methods
USING:
accessors
io.pathnames
xmode.highlight
;
M:
pathname
highlight.
string>>
highlight.
;
USING:
io.encodings.utf8
io.files
kernel
sequences
strings
xmode.catalog
xmode.highlight
;
M::
string
highlight.
( path -- )
path
utf8
file-lines
[
path
over
first
find-mode
highlight-lines
]
unless-empty
;
USING:
vocabs
vocabs.loader
xmode.highlight
;
M:
vocab
highlight.
vocab-source-path
highlight.
;
USING:
io.streams.string
see
splitting
words
xmode.highlight
;
M:
word
highlight.
[
see
]
with-string-writer
split-lines
"factor"
highlight-lines
;