C#, Inno Script, Autohotkey lexers

All questions regarding lexer highlighting schemes are discussed here...
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Is it good idea to remove special highlight of {...} in Inno lexer? It works not 100% ok, in complex strings like "test{dd}test{dd}test{dd}test" it will not handle all vars.
I want to remove these rules for {..} vars, users can use Highlight Variables plugin
ANewUser
Posts: 50
Joined: 25.01.2020 12:15

Post by ANewUser »

Sorry somehow I have not noticed the previous 2 posts!
I will examine the new things in the version 6.0.
As for the {...}, if it is not working reliable then remove it.

By the way the string type is not highlighted as other types. Maybe it is in a wrong group.
ANewUser
Posts: 50
Joined: 25.01.2020 12:15

Post by ANewUser »

for AHK lexer:
The function names must be followed immediately with (. So ex. the "if (true)" is not a function call.
https://i.imgur.com/dE4xPVX.png

Code: Select all

; missing the "#include" directive
#include abcfile.ahk

; multi line string
; the opening ( can follow some options, so it has not to be at the line end
; before both the opening ( and closing ) can be spaces/tabs
; it is comparable to "var = ..." and not "var := ..." 
x = 
(
   string
   more strings
   line
)

; function declaration for code tree
; there is no space between the function name and the opening (
; the opening { can be on the same line as the name
; the name does not have to be at the first column
xyz(a,b)
{
   ; ...
}

; class declaration for code tree
; the opening { can be on the same line as the name
; the name does not have to be at the first column
class abc
{
   ; ...
}
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Inno:
'string' style fixed, removed support for {...} in string. lexer update in next 20min.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

AHK: fixed all, multiline str is added (I don't check for = sign, only for () on separate lines)
lexer update in next 10min.
ANewUser
Posts: 50
Joined: 25.01.2020 12:15

Post by ANewUser »

Thank you!
The code tree is meant for listing declarations only or for listing every occurence/usage?
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

It depends, usually for declaration only
king.midas
Posts: 40
Joined: 26.02.2019 13:47

Post by king.midas »

Hello!

In AHK lexer "empty parameters functions" does not add to code tree. Problem in CudaText and SynWrite
Sample:

Code: Select all

func1(s) {}
func2() {}
https://i.imgur.com/WMlzp5v.png
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

fixed the AHK lexer, thanks for report. update in AddonManager and test.
king.midas
Posts: 40
Joined: 26.02.2019 13:47

Post by king.midas »

Thank you very match!

After update found another bug:
Function calls with next block "{}" shows in tree. Sample:

Code: Select all

run_Editor()
{
    if ( IsWinVis(WinDesc) )
    {
        WinActivate, %WinDesc%
    }
    else if IsWinVis(WinDesc1)
    {
        WinActivate, %WinDesc%
    }
    else if WinExist(WinDesc)
    {
        WinRestore, %WinDesc% 
        ; WinShow, %WinDesc% 
        ; WinWait, %WinDesc%
        WinActivate, %WinDesc%
    }
    else
        Run("%PROGRAM_Editor%",,,,,1)
}
https://i.imgur.com/zHvjNy9.png
Post Reply