pkulchenko / ZeroBraneStudio

Lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and other Lua interpreters on Windows, macOS, and Linux
http://studio.zerobrane.com/
Other
2.59k stars 518 forks source link

Update Fennel keywords in lexer. #1137

Closed technomancy closed 2 years ago

technomancy commented 2 years ago

Also remove the inherited "longstring" rule from the Lua lexer.

I tried adding a "kwstring" rule for :this-style string but it seems to have no effect; any idea what I'm doing wrong here?

lex:add_rule('kwstring', token(lexer.STRING, P(":") * subsequent^1))

thanks!

pkulchenko commented 2 years ago

Thank you for the patch! I don't mind merging, but it would be ideal to submit it upstream, so I can get it from the "official" source.

lex:add_rule('kwstring', token(lexer.STRING, P(":") * subsequent^1))

Could it be not working because : is part of the identifier syntax?

technomancy commented 2 years ago

That's exactly what it was; thanks! Colon doesn't belong in identifiers.

I'll submit upstream, yeah. Thanks for the pointer. Will go ahead and close this then.

technomancy commented 2 years ago

Submitted this upstream: https://github.com/orbitalquark/scintillua/pull/61

pkulchenko commented 2 years ago

@technomancy, sounds good. Could you ping the ticket when the upstream PR is closed? I'll merge the changes then. Thanks!

technomancy commented 2 years ago

Looks like a variant of this has been merged upstream: https://github.com/orbitalquark/scintillua/commit/5364b9d8425a10484d44459b89f56deaf6e4235e