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.62k stars 518 forks source link

Fix. Recognition of `linecomment` option in lexlpeg lexers #1007

Closed moteus closed 5 years ago

moteus commented 5 years ago

New LPeg lexers export _FOLDPOINTS instead or _foldsymbols table.

I test it with Perl and Python on Ubuntu/Windows

pkulchenko commented 5 years ago

@moteus, thank you for the patch! It may make sense to keep both ways though, as the IDE still supports different versions of wxwidgets, including those that include "old" lexers. Can you combine the two and rebase against the current master? Thank you!

moteus commented 5 years ago

I merged my branch with the current master. My fix should work with old lexers as whell

local comments = (lexmod._FOLDPOINTS and lexmod._FOLDPOINTS.comment) or
        (lexmod._foldsymbols and lexmod._foldsymbols.comment) or {}
pkulchenko commented 5 years ago

Thanks @moteus! Merged the changes, although I ended up cherry-picking them, as you merged master changes instead of rebasing on top of them, which created the merge commit in your branch instead of re-applying the changes in your branch on top of the current master branch. Not a big deal, but if you want the merge to be cleanly applied (without merge commit), you'd need to use rebase.

I tested the changes on some of the lexers with line commits and everything appears to be working correctly. Let me know if you notice any issues.