[C/C++] Add attributes#4523
Conversation
|
I'll definitely consider it, but not soon. I don't understand how it all works well enough yet to do what I'd consider a good enough job yet. However, I am working on a programming language, so I'll have practice writing the syntax highlighting for that - it's (in part) designed to be much easier to parse than C++, so it should be easier to do and good practice before I try full production-grade C++ syntax. In addition, I have never touched Objective-C or Objective-C++, so I wouldn't be able to complete those rewrites. |
Cool! If you have questions, feel free to visit the ST forum or Discord. Edit: I should also mention that if you're the one designing the language, and you're using formal syntax to do so, there are projects to convert them to Sublime Syntax: SBNF original in Rust, SBNF re-implementation in Python, and Langspec. But if you're writing a syntax the by-hand way, people are happy to help. (Maybe help with the formal things, too, just not me.) |
|
From what I understand, “Objective-X is a strict superset of X”, so all you have to do is understand the Objective syntax extensions to bolt it on top. (Contrast with the fact that C++ is not a strict superset of C) |
I added support for syntax highlighting of C/C++ attributes based on the cppreference documentation for C and C++.
In addition, this fixes a bug where the syntax highlighting breaks when an attribute is in the same line as a function (it no longer considered it to be a function).