Skip to content

Stop highlighting Rust int as a type - #5610

Open
Aaron Katzin (AaronKatzin) wants to merge 1 commit into
microsoft:mainfrom
AaronKatzin:fix/rust-int-not-type
Open

Aaron Katzin (AaronKatzin) wants to merge 1 commit into
microsoft:mainfrom
AaronKatzin:fix/rust-int-not-type

Conversation

@AaronKatzin

Copy link
Copy Markdown

Rust has no int type, but int was in typeKeywords, so it was highlighted as a type (for example fn int() {}).

This removes int from that list and adds tokenization tests. It does not change the identifier regex.

Upstream PR #3143 failed tests because it rewrote the identifier regex so words had to be followed by whitespace, and its new test expected a brackets.rust token. Monarch emits delimiter.parenthesis.rust and delimiter.curly.rust for () and {}.

Upstream issue: #3123

This change was AI-assisted.

`int` is not a Rust type. Remove it from typeKeywords so names like `fn int` are identifiers, and cover that in the rust tokenization tests.

Co-authored-by: Aaron Katzin <AaronKatzin@users.noreply.github.com>
@AaronKatzin

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

This branch has not been deployed

No deployments
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.

2 participants