This Node script creates a REPL for the J langage by calling out to the J shared lib (libj.so
) via the node-ffi-napi.
I would like to be able to do syntax highlighting on the input (and perhaps output) using emphasize, which wraps highlight.js through lowlight to output ANSI syntax highlighting.
emphasize
is "ESM only". I'm not a Node guy, so I'm not sure exactly what that means, apart from the fact that I can't simply do require('emphasize')
in my Node script. Any help on how to get this working would be appreciated.
The highlight.js language definition for J is here.