Closed andycmaj closed 7 years ago
Would like to add more specs for this... figuring out how to do that... jasmine?
@andycmaj You might want to take a look at my language-java PR which also adds Generics highlighting: atom/language-java#22.
@50Wliu, thanks... any advice on what I should do differently here? Don't want to go re-writing the entire csharp grammar, as it seems like most things work fine right now...
some specific feedback on my change would be good.
thanks. excited to start contributing to atom stuff
Big rewrite of the grammar just got merged that takes care of generic method parameters and their constraints.
Also has same issue of return-types not highlighting multiple args properly however. Doing that is going to require rewriting the method detection somewhat significantly and is non-trivial.
Sorry your PR didn't get merged in - that reworking was quite complex even without bringing additional PRs into scope :(
Before
Notice how method names with Generic parameters aren't parsed as
entity.name.function.cs
. You can tell becauseRegister<TEvent>
has no style applied. Also, Generic parameters aren't recognized in method return-types.After
Method names with Generic parameters are recognized as
entity.name.function.cs
, and the Generic params themselves are recognized. Generic params in return-types are also recognized.Known issue
#parameters
pattern does, but doesn't seem to work here. Any help would be appreciated, but this is still an improvement even without this sub-fix.