-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Ok, here we go. This'd be super nice.
The best place to start would be with the XtlangLexer I wrote for Pygments:
Most of the regexes could just be copy-pasted into the hljs version (although there may be some edge cases which need to be fixed up).
Then, it's just a matter of following the hljs docs for adding a new language. I've made a (very small) start with this repo, but feel free to even start from scratch (i.e. from hljs mainline if you'd prefer).
After that, the main trick with syntax highlighting for Extempore is to make sure that both the Scheme code and the xtlang code look ok. The stack-based highlighting approach of highlight.js (and Pygments, for that matter) does make this easier in some ways - look at the way the XtlangLexer does it in the Pygments link above.
If you need a few simple test cases for different syntactical things which can be tricky, have a look at the bottom of the tests/core/xtlang.xtm file in the main Extempore repo.