zero-plusplus / vscode-autohotkey-debug

https://marketplace.visualstudio.com/items?itemName=zero-plusplus.vscode-autohotkey-debug
MIT License
52 stars 4 forks source link

Failed to get Class value on hover the variable. #186

Open pepeu93 opened 2 years ago

pepeu93 commented 2 years ago

This[Str] shows the value correctly, however, if be anything after [Str] it doesn't show the value anymore.

To reproduce: Put a breakpoint in the line Pause := 1 and hover both This:

Foo.Foo("Hello World")

Class Foo {
   Foo(Str) {

      This[Str] := 1
      MsgBox % This[Str]

      This[Str]Something := 1
      MsgBox % This[Str]Something
      Pause := 1

   }
}

Is it a bug?

zero-plusplus commented 2 years ago

For now, this is a specification. However, this may be improved when the AutoHotkey parser we are working on is completed.

In general, if you want to write This[Str]Something := 1, it is recommended to put a linebreak between them.

Also, when using string concatenation, it is recommended to use the string concatenation operator (or whitespace).

pepeu93 commented 2 years ago

I see, thanks, may I ask whats an AutoHotkey parser and where I can read more about this parser you're working on?

zero-plusplus commented 2 years ago

The AutoHotkey parser is a tool that converts an AutoHotkey program into an AST. It's a different language, but you may be able to understand what an AST is by looking here.

It can be used to solve this issue because it can recognize This[Str]Something as This[Str] and Something separately.

This is still under development and not available to the public.

zero-plusplus commented 1 year ago

The suggestion process has been overhauled in the creation of this issue's feature. Thereby this issue is solved.

I will close this issue as soon as a new version is released.