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

Semantic Tokes for Native Components and Type completion in Type Expressions #927

Merged
merged 3 commits into from Oct 6, 2023

Conversation

markwpearce
Copy link
Collaborator

Semantic tokens for Components Types/Interfaces:

image

Code completion in Type Cast/Type Expression:

image

@@ -412,6 +412,11 @@ export class Parser {
});
//consume the statement separator
this.consumeStatementSeparators();
} else if (this.peek().kind !== TokenKind.Identifier && !this.checkAny(...DeclarableTypes, ...AllowedTypeIdentifiers)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only try to find a type if the next token can be a type identifier -- basically, don't throw an exception if there isn't the correct kind of token next.
This is important so that we can do completions inside this expression

Copy link
Member

@TwitchBronBron TwitchBronBron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

}]);
});

it('only shows intrinsic/native types in brightscript', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice test!

@markwpearce markwpearce merged commit 28d6d6a into release-0.66.0 Oct 6, 2023
6 checks passed
@markwpearce markwpearce deleted the intrinsic_types_semantic_tokens branch October 6, 2023 12:37
@TwitchBronBron TwitchBronBron added this to the v1.0.0 milestone Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants