EmmyLua / IntelliJ-EmmyLua

Lua IDE/Debugger Plugin for IntelliJ IDEA
https://emmylua.github.io
Apache License 2.0
1.72k stars 285 forks source link

Addition assignment flagged as invalid #567

Closed Corofides closed 8 months ago

Corofides commented 8 months ago

Environment(环境)

IntellijIDEA version
IDEA version 17.0.5+1-b653.23 x86_64
EmmyLua version 1.3.8
OS OSX 11.6

What are the steps to reproduce this issue?(重现步骤?)

Create a lua script local varName = 0 varName += 1

What happens?(出现什么问题?)

Highlighted red Error appears '= unexpected'

What were you expecting to happen?(期望?)

No error should be valid as it's correct syntax and compiles/ runs correctly

Any other comments?(其它说明)

Thanks for the plugin. It's really great!

CppCXY commented 8 months ago

No, Lua does not have the syntax '+=' that you mentioned. This is not a standard Lua syntax. Perhaps the version of Lua you are using is a custom or extended version that is not supported by EmmyLua. If you want better support, I recommend using the lua-language-server (sumneko-lua) plugin for VSCode.

Corofides commented 8 months ago

Ah, you are correct. The SDK I was using was adding them in. Sorry about that.

image