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

Convert Rust lexer #83

Closed snoopy closed 1 year ago

snoopy commented 1 year ago

I made some slight changes. Mainly to deal with Rust's disastrous decision to use ' as an operator.

orbitalquark commented 1 year ago

Thanks, this is a good start. Before committing it, I'd really like to have support for highlighting built-in constants, functions, etc., as well as support for highlighting arbitrary functions and methods (like the other migrated lexers). I don't know anything about Rust, so please use your best judgement.

If you're not feeling up for it, no problem. Just please submit a separate fix for the existing legacy lexer and we'll punt the migration to some other time.

snoopy commented 1 year ago

I've split it up into several commits. The first one should be only the conversion itself. All the commits after that try to improve upon the base lexer.

orbitalquark commented 1 year ago

Committed as https://github.com/orbitalquark/scintillua/commit/6e9c610eef727a413df61baf970a47ddf6cf4228

Thank you! This looks great :)