C# highlighting is not respecting the @ symbol in front of a parameter.
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.27.0",
- Plugins: none
- Environment: [e.g. Browser, Node, Webpack]
Description
There seems to be a glitch, regarding C# syntax highlighting, not respecting @ symbol before a parameter.
To illustrate, when using the following markdown,
public TChild FirstOfTypeOrDefault(TChild @default = null);
Unexpectedly, 'default' gets highlighted in blue as if it's a keyword.
On the contrary, in this context, '@default' should be treated as a regular parameter and highlighted in black, as '@default' is not a keyword. Therefore, 'default' being highlighted in blue is incorrect.
The expected correct highlighting would treat 'default' as an identifier rather than a keyword, so it should be highlighted in black (or the color assigned for identifiers in your theme) instead of the blue color usually reserved for keywords. This is due to the @ symbol preceding it, which, in C#, effectively makes 'default' a valid identifier instead of a keyword.
Example
public TChild FirstOfTypeOrDefault(TChild @default = null);
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
Run the supplied C# snippet through Prism's C# grammar and inspect how the @ symbol and default are classified. Done means @default is highlighted as an identifier rather than as the default keyword; no specific file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100