Skip to content

Support optional chaining #2076

@spider1987

Description

@spider1987

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Formatting

Expected Behaviour

        if weaps[i]?.serial ~= tempInv[i].vars.serial then
            if weaps[i]?.obj then
                DeleteObject(weaps[i].obj)
                weaps[i] = nil
            end
            GiveWeap(tempInv[i])
        end

Actual Behaviour

syntax Problem '?'

Reproduction steps

  1. Go to '...'
  2. Click '...'
  3. See error '...'

Additional Notes

No response

Log File

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions