Skip to content

Fix multiplication in parameters not being highlighted correctly - #111

Merged
DustinCampbell merged 1 commit into
dotnet:masterfrom
Muchiachio:TM-82/99
Apr 23, 2018
Merged

DustinCampbell merged 1 commit into
dotnet:masterfrom
Muchiachio:TM-82/99

Conversation

@Muchiachio

@Muchiachio Muchiachio commented Apr 22, 2018 •

Copy link
Copy Markdown
Contributor

Didn't want to introduce additional complexity here, so I just removed all pointer suffix expressions, because even with them pointer suffixes are styled as keyword.operator.arithmetic.cs or are breaking syntax highlight around them. I'm also finishing verbatim identifier support #25, so it might be used as an example for future pointer support as their have similarities in character "positioning".

And I think we can all agree that multiplication is used way more often than pointers in c#, so it's better to have correct syntax highlight for them. Especially knowing that currently pointers aren't styled differently.

Fixes #82, #99.

@DustinCampbell

Copy link
Copy Markdown
Member

You're right that this is probably the better judgement call. I think this will cause a lot of highlighting problems when pointer types are used in many contexts (e.g. casts, parameters, etc.), but I it's definitely better to prefer arithmetic expressions.

@DustinCampbell
DustinCampbell merged commit dff7d72 into dotnet:master Apr 23, 2018
@Muchiachio
Muchiachio deleted the TM-82/99 branch May 1, 2018 15:11
DustinCampbell added a commit to DustinCampbell/vscode that referenced this pull request May 2, 2018
* Prefer multiplication over pointer types.
([csharp-tmLanguage#111](dotnet/csharp-tmLanguage#111))
* Add support for verbatim identifiers. ([csharp-tmLanguage#112](dotnet/csharp-tmLanguage#112))

All fixes contributed by [@Muchiachio](https://github.com/Muchiachio).
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.

Incorrect syntax highlighting

2 participants