-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C# Attributes #662
Comments
@mvalipour Could you take a look? |
I've also noticed it doesn't highlight generics:
The method name and invocation will highlight on the first line, but not the second. I started to look into these a while ago but got busy :( I'll try and have a look again if I can get time (and it's not tended to in the meantime). |
well, attribute selection is going to be tricky because there can be confusion between var dic = new Dictionary<string, string> {
[key] = value,
[key2] = value2
} for generics tho, it should be fine. do you guys agree? |
@mvalipour: Can you submit a PR if you think you can improve the current highlighting? |
I'm happy to do so, however, what I'm trying to figure out is that this is something within the possibilities of prism. -- to my understanding, prism is very limited in terms of syntaxes it can find (given it doesn't parse the code and purely relies on regular expressions). I had a quick look and nothing seems to be done around for example templates in cpp (which are the equivalent of c# generics) |
Regexp are powerful though. The idea here is trying to achieve the best possible result using them. :) |
(EDIT: And when I say attribute, I mean annotation... sorry)
In C#, decorating with annotations goes unnoticed by the parser. For instance, in:
-the "[RemotableService]" annotation does not get colored at all.
In "[TaskDefinition(...]", the word TaskDefinition gets colored, but not the [.
Is there anything to do about that..?
The text was updated successfully, but these errors were encountered: