Go generic functions are not parsed correctly
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13k
- Forks
- 1.4k
- Avg merge
- 15h 36m
- Merged PRs (30d)
- 3
Description
Information:
- Prism version: 1.29
- Language: Go
- Plugins: none
- Environment: Browser
Description
The Go parser seems to get confused when generic type arguments are present (generics were added to go in 1.18 in March 2022). Using the Test drive from the Prism website, the screenshow below shows that the first Bar is parsed as a function, but the second Bar is parsed as punctuation instead of a function.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Prism website Test drive and reproduce the supplied Go example containing generic type arguments. Then locate the Go parser or grammar responsible for the two Bar declarations and compare their highlighted token types; done when both function declarations are parsed consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100