orbitalquark / scintillua

Scintillua enables Scintilla lexers to be written in Lua, particularly using LPeg. It can also be used as a standalone Lua library for syntax highlighting support.
https://orbitalquark.github.io/scintillua
MIT License
51 stars 20 forks source link

add Janet lexer #66

Closed sevvie closed 5 months ago

sevvie commented 2 years ago

This was originally created for the vis repository, but it was recommended that the lexer itself be submitted upstream. This is just a copy of the clojure.lua lexer with the appropriate tokens for Janet (https://janet-lang.org)

qiu-x commented 2 years ago

Hello, it seems like this lexer is written in the legacy format. Before it can be merged it has to be updated to the new format (see https://orbitalquark.github.io/scintillua/api.html#migrating-legacy-lexers)

orbitalquark commented 2 years ago

Thanks for your contribution. As mentioned previously, this lexer is in a legacy format and should be converted. I can do it myself, but only when I find some time.

orbitalquark commented 2 years ago

By the way, this lexer is also incomplete, based on Janet syntax: https://janet-lang.org/docs/syntax.html

It's missing highlighting for nil, true, and false; numbers like 1.3e18 and 1_000_000; long strings (backticks); and possibly shorthands.

It's quite possible the Clojure lexer is incomplete (since that's what this lexer is based on), but that is another issue.