thqby / vscode-autohotkey2-lsp

Autohotkey v2 Language Support using vscode-lsp.
https://marketplace.visualstudio.com/items?itemName=thqby.vscode-autohotkey2-lsp
GNU Lesser General Public License v3.0
219 stars 21 forks source link

Fail to parse object with property defined by an expression #30

Closed aseiot closed 3 years ago

aseiot commented 3 years ago

Demonstrated as follow:

o := { (true ? "x" : "y") : "value"}

thqby commented 3 years ago

Correct grammar is

o := { %(true ? "x" : "y") %: "value"}
aseiot commented 3 years ago

I can't remember whether the syntax is allowed officially, and I can not found related instrument in document as well. But the code I posted is working.

Anyway, I will change my code to suppress the alert. Thanks!

thqby commented 3 years ago

image Tested with AutoHotkey_L v2.0-a138-7538f26

aseiot commented 3 years ago

Sorry, It may due to I am running my custom build of AHK, which object literal is supporting "string" as the property name as before. I will double check the issue with official AHK release before reporting next time.