toaruos/apps/highlight-source.krk
2021-01-23 20:00:36 +09:00

12 lines
266 B
Plaintext
Executable File

#!/bin/kuroko
import fileio, syntax.highlighter, kuroko
let code
with fileio.open(kuroko.argv[-1]) as f:
code = f.read()
let highlighter = syntax.highlighter.KurokoHighlighter(code)
highlighter.highlight()
syntax.highlighter.toTerminal(highlighter.process())