Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Add "size" (used in array literals) to the list of highlighted keywords #1391

Closed
wants to merge 1 commit into from

Conversation

tcNickolas
Copy link
Member

No description provided.

@@ -48,7 +48,7 @@
},
{
"name": "keyword.other.qsharp",
"match": "\\b(new|not|and|or|w\/)\\b"
"match": "\\b(new|not|and|or|w\/|size)\\b"
Copy link
Contributor

Choose a reason for hiding this comment

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

The tricky thing about size is that it's not a true keyword like not. It acts like a keyword when it occurs in a specific part of an array literal, but it's still a valid identifier:

let size = 123;
let xs = [size, size = 2]; // first size is a variable, second size is a "keyword"

So I am not sure if we want all instances of size highlighted.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, let me see if I can make something like "a comma, optional whitespace, size, optional whitespace, equality sign" work without also highlighting the comma and the equality...

@tcNickolas
Copy link
Member Author

I didn't get to this in the past month and likely won't get to in the next month, so I've opened #1419 and will close this PR for now.

@tcNickolas tcNickolas closed this Apr 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants