I've updated the v2 lexer to match the syntax of v2.0-a082. It was a few versions behind. Since it can be much simpler now, I've split it from the v1 lexer.lexikos wrote:I've just uploaded the lexers (syntax highlighters) that I've been using for the last few months.
AutoHotkey lexers for Scintillua + SciTE4AutoHotkey
AutoHotkey v1 and v2 are supported. A Lua script is included to automatically switch lexers when a "v2" platform is selected. Both lexers almost fully support the unique syntax of each command.
Caveats:
- Continuation sections are given a single flat style. This is to avoid inaccurate/misleading styling, because styling code within a continuation section accurately seems to be impossible with Scintillua. (The best I could achieve was styling which broke as soon as you edit a line near or in the section, and even that was complicated.)
- Continuation lines may be styled as though they are standalone expressions. This is a problem, for instance, if you spread the parameter list of a command across multiple lines.
- So-called "keywords" in strings are not highlighted, by design. (If a keyword is highlighted, it had better actually mean something in that context. Although it would be possible to highlight keywords such as sub-commands only in-context, it would further complicate the grammar.)
- It's memory-hungry.
Lex's lexers (mostly accurate highlighting for v2.0-a082)
Lex's lexers (mostly accurate highlighting for v2.0-a082)
Originally posted here.
Re: Lex's lexers (mostly accurate highlighting for v2.0-a082)
What an awesome comeback you have made from self-imposed exile...the productivity is very impressing and SO nice for AHK...people were worried there for a while. Happy New Year to you lexikos and thank you very much for spreading joy in the houses again
Re: Lex's lexers (mostly accurate highlighting for v2.0-a082)
I haven't updated the lexers yet, but I have fixed the lexers to work with Scintillua 5.3 (tested on SciTE 5.2.3 and SciTE4AutoHotkey 3.1.00).