genius257 / vscode-autoit

AutoIt language extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=genius257.autoit
MIT License
4 stars 3 forks source link

Declarations in For loops are ignored #50

Closed genius257 closed 5 days ago

genius257 commented 5 months ago
Global $aItems = [1, 2, 3]
For $item In $aItems
    ConsoleWrite($item & @CRLF)
Next

Currently $item will not work for declaration lookup or completion suggestions.

genius257 commented 2 months ago

The problem seems to be with the parser. Currently the variable declared in a ForStatement is parsed as a normal VariableIdentifier, instead as the expected VariableDeclaration.

genius257 commented 5 days ago

Fixed via 08d28d2616a56f4710dfa71da85af4579ec8daae