GroggyOtter / ahkv2_definition_rewrite

Full update of the definition file for THQBY's AHKv2 support addon.
62 stars 7 forks source link

Extension reports problems in ahk2.d.ahk #5

Closed visua0 closed 2 months ago

visua0 commented 4 months ago

I don't know if this is expected or if this can be fixed. All I know is it doesn't happen with the default ahk2.d.ahk. image These problems show up as soon as I ctrl+hover over something in my code that is defined in ahk2.d.ahk and don't go away until I restart vscode.

GroggyOtter commented 4 months ago

Those are all optional parameters that are empty arrays by default.
THQBY's addon treats the syntaxes files special by allowing brackets inside parameters.
However, I don't think it knows how to account for a second set of brackets appearing, thus generating an error.
Example AddTab3([Options:='', TabTitles:=[]]) => Gui.Tab
TabTitles is supposed to be an array of values and omitting it is the same as passing in an empty array.
But the language parser hasn't been been told to account for a second set of brackets. And that's not something I can fix within the definition file.

However, you can always ask him to implement support for it on his github and he might update it. He's pretty active.

GroggyOtter commented 2 months ago

@visua0 in the next update, those errors will go away as I've updated all parameters that contain :=[] to :=Array to indicate an array is expected.

GroggyOtter commented 2 months ago

Fixed with v1.3