teal-language / vscode-teal

Teal language support for Visual Studio Code
MIT License
76 stars 11 forks source link

No completions for arrayrecords #53

Open overcrook opened 2 years ago

overcrook commented 2 years ago

It seems that arrayrecords are not being parsed properly. I'm using tl v0.13.1 and vscode-teal v0.8.3.

The snippet (pasted below) runs just fine, but there are no completions for a.arrayrecord. There are no errors in vscode either. Here is the snippet:

local record A
    record B
        name: string
    end
    record BArray
        {B}
    end

    array: {B}
    arrayrecord: BArray
end

local a: A = {
    array = {
        {
            name = 'A.array[1]'
        }
    },
    arrayrecord = {
        {
            name = 'A.arrayrecord[1]'
        }
    }
}

print(a.array[1].name)
print(a.arrayrecord[1].name)

There is only standard vscode completion:

no suggestions for the arrayrecord

Comparing with regular arrays:

suggestion for the array

overcrook commented 2 years ago

Just checked the latest teal version 0.13.2+dev (commit ce5c741efde0c7417ca443eb268a744e2fd738c4) with the same result.