toaruos/apps/highlight-source.krk

12 lines
266 B
Plaintext
Raw Normal View History

2021-01-23 14:00:36 +03:00
#!/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())