Stillat / vscode-antlers-language-server

Provides rich language features for Statamic's Antlers templating language, including code completions, syntax highlighting, and more.
https://antlers.dev
MIT License
38 stars 3 forks source link

[ANTLR_201] Unexpected string start while parsing variable path. String literals must be within array accessors. #38

Closed ryanscherler closed 2 years ago

ryanscherler commented 2 years ago

Describe the bug It seems that the ANTLRS server doesn't like how I am accessing this property? (See attached)

Screen Shot 2022-08-03 at 3 03 57 PM

I am using the regex version of the statamic antlers engine and also using the Spatie responsive image plugin and wanted access to the default image:src for a poster attribute on the video tag. This was the only way I could figure out access to it.

Is there a way to suppress this error?

Impacted Products Which Antlers Toolbox products does this bug apply to?

Versions and Other Plugins/Extensions 2.3.0

JohnathonKoster commented 2 years ago

@ryanscherler

Thanks for the report! Unfortunately, there is no way to disable specific error codes within the server. I've updated the language server's parser to remove this false positive and should be good to go if you update to 2.3.1 🙂

ryanscherler commented 2 years ago

Awesome thanks @JohnathonKoster - this is such a helpful toolbox for building Statamic sites!