Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing completions after stream keyword and table keyword #33931

Closed
Tracked by #33628
malinthar opened this issue Nov 22, 2021 · 3 comments
Closed
Tracked by #33628

Missing completions after stream keyword and table keyword #33931

malinthar opened this issue Nov 22, 2021 · 3 comments
Assignees
Labels
Area/Completion Issues related to Language Server Auto Completions Points/2 Equivalent to two days effort Priority/High Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Bug

Comments

@malinthar
Copy link
Contributor

Description:
stream

A similar behavior is observed after table keyword as well.

Steps to reproduce:

function queryTest() {
    int[] arr = [1,2,3];
    table <cursor>
}

Affected Versions:
slbeta4

@malinthar
Copy link
Contributor Author

Sub-task of #33628

@malinthar malinthar added Team/LanguageServer Language Server Implementation related issues. #Compiler Area/Completion Issues related to Language Server Auto Completions labels Nov 22, 2021
@nadeeshaan nadeeshaan changed the title Missing comopletions after steam keyword and table keyword Missing completions after stream keyword and table keyword Nov 22, 2021
@dulajdilshan dulajdilshan added the Points/2 Equivalent to two days effort label Dec 2, 2021
@malinthar
Copy link
Contributor Author

Please refer https://ballerina.io/ballerina-spec/spec.html#section_6.35 for possible completions at the depicted cursor position.

@TharushiJay
Copy link
Contributor

At cursor position table <cursor>, there are 2 possible behaviours. It can either be followed by a row-type-parameter to form a table-type-descriptor (https://ballerina.io/ballerina-spec/spec.html#table-type-descriptor) or a key-specifier to form a query-construct-type (https://ballerina.io/ballerina-spec/spec.html#query-construct-type)

Honoring the parsers’ decision to identify node at cursor as TableTypeDescriptorNode and resolving to TableTypeDescriptorNodeContext (for a table-type-descriptor), completions cannot be provided for a key-specifier to form a query-construct-type.

Similarly, stream <cursor> can form either a stream-type-descriptor (https://ballerina.io/ballerina-spec/spec.html#stream-type-descriptor) or a query-construct-type (https://ballerina.io/ballerina-spec/spec.html#query-construct-type). Therefore, completions cannot be provided after stream keyword as well.

Hence, closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Completion Issues related to Language Server Auto Completions Points/2 Equivalent to two days effort Priority/High Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Bug
Projects
None yet
Development

No branches or pull requests

4 participants