FuPeiJiang / ahk_parser.js

find func, string, everything in AHK_L v1; convert v1 to AHK_H v2; converter
https://FuPeiJiang.github.io/ahk_parser.js/
13 stars 1 forks source link

numeric string + 0 #20

Closed robmunger closed 3 years ago

robmunger commented 3 years ago

@FuPeiJiang Thanks again for this great script. I converted 1221 lines of a large script, but the converter crashes on the following code.

If I replace "_AllIDsString .= (AllWindows%AIndex%+0) "|"" with "_AllIDsString .= (AllWindows%AIndex%) "|"" (ie I remove the "+0") the code converts.

Thanks!

PurgeWinList() {
    WinGet, AllWindows, List
    AllIDsString := ""
    Loop, %AllWindows% {
        AllIDsString .= (AllWindows%A_Index%+0) "|"
    }
    Sort, AllIDsString, D|
    For Key, Val in this.Windows {
        If(!InStr(AllIDsString,Key)) { 
            this.DeleteProfile(Key)
        }
    }
}
FuPeiJiang commented 3 years ago

I've isolated it to: v:=2 "s"

woops, I didn't put lineWhereCanConcat = i after everything.push({type:'Integer',text:fEvalidName,i1:i,c1:nonWhiteSpaceStart,c2:c})

ok, now Integers can concat ~doesn't freeze anymore~ should be fixed

robmunger commented 3 years ago

Bravo!