vlang / v-analyzer

The @vlang language server, for all your editing needs like go-to-definition, code completion, type hints, and more.
MIT License
86 stars 9 forks source link

errors in script mode `bad top level statement […]` #98

Open ttytm opened 3 months ago

ttytm commented 3 months ago

Describe the bug

Until now v-analyzer doesn't support script mode properly (when statements are not wrapped in a function). The inital report was not fully true. I'm encountering cases where analyzer does work with top level statements in script mode. Idk yet if it's related to running multiple v-analyzer instances or in certain directory structures. Gonna update to a proper reproduction if I get the chance to isolate the problem.

Expected Behavior

Should work in script mode.

Current Behavior

bad top level statement […] errors

Reproduction Steps

my_stmt := ''

Possible Solution

No response

Additional Information/Context

Environment details (v doctor output)

-

Editor name

any

v-analyzer Version

up to v0.0.4.nightly

VS Code Extension Version

No response