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

First constant array is marked as problem #48

Closed Enchillada411 closed 5 months ago

Enchillada411 commented 5 months ago

It looks like there is an issue with constant arrays. Only the first occurrence of an constant array is marked as problem.

Const $constVar = 2
Const $constArray[2] = [1, 2]
Const $constArray2[2] = [1, 2]

Problem: Expected " ", "=", "\t", or [0-9a-zA-Z_] but "[" found.

[{ "resource": "/C:/Users/GlobalConstArray.au3", "owner": "_generated_diagnostic_collectionname#0", "severity": 8, "message": "Expected \" \", \"=\", \"\t\", or [0-9a-zA-Z_] but \"[\" found.", "startLineNumber": 2, "startColumn": 18, "endLineNumber": 2, "endColumn": 19 }]

genius257 commented 5 months ago

The parser for AutoIt has the fix for this in autoit-pegjs v1.2.0 I will upgrade the dependency and run some manual tests, before I'll release a new version

genius257 commented 5 months ago

@Enchillada411, the issue should now be solved in version 1.5.0 (just released), please verify 😃

Enchillada411 commented 5 months ago

@Enchillada411, the issue should now be solved in version 1.5.0 (just released), please verify 😃

Looks good. Thanks a lot for this quick fix.