Skip to content

fix(lexers/go): "~" is a valid token#926

Merged
alecthomas merged 2 commits intoalecthomas:masterfrom
abhinav:go-tilde
Feb 12, 2024
Merged

fix(lexers/go): "~" is a valid token#926
alecthomas merged 2 commits intoalecthomas:masterfrom
abhinav:go-tilde

Conversation

@abhinav
Copy link
Copy Markdown
Contributor

@abhinav abhinav commented Feb 12, 2024

With the introduction of generics,
tilde is a valid punctuation token in Go programs.
https://go.dev/ref/spec#Operators_and_punctuation

This updates the punctuation regex for the Go lexer,
and adds a test to ensure that it's treated as such.

With the introduction of generics,
tilde is a valid punctuation token in Go programs.
https://go.dev/ref/spec#Operators_and_punctuation

This updates the punctuation regex for the Go lexer,
and adds a test to ensure that it's treated as such.
@alecthomas
Copy link
Copy Markdown
Owner

Thanks, good catch.

@alecthomas alecthomas merged commit 506e36f into alecthomas:master Feb 12, 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.

2 participants