Skip to content

[VSCode] C/C++ must-have highlighter that understands many coding styles and APIs.

Notifications You must be signed in to change notification settings

kobalicek/reloaded-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Reloaded C/C++

Extension that replaces the built-in C/C++ tokenizer/grammar and introduces additional tokens that can be styled. This extension should be used together with Reloaded Themes extension as the additional tokens are new and not recognized by other themes!

Important

  • This extension DOES NOT provide code assistance, it just recognizes common patterns used in today's C++ code.
  • This extension is experimental and should be used only with themes that understand the additional tokens it recognizes. If you don't use a compatible theme there is no point of using this extension.
  • Suggestions are welcome, if you think about more tokens / symbols to be recognized please fill an issue.

Concepts provided

  • It treats C/C++ the same way (no more separate grammar for C, the reason was that header files were already tokenized as C++ anyway, so there was no point of maintaining two grammars).
  • It supports C and C++ keywords and provides styles so each keyword can be highlighted individually (you can highlight inline differently than extern, for example).
  • It recognizes formatting and escaping of C/C++ strings like "%d" and "\n", respectively.
  • It recognizes basic markdown and doxy-style commands in C/C++ comments, both \\ and @ doxygen escapes are recognized.
  • It recognizes common types and constants of standard C library, Windows, Linux, and MAC.
  • It recognizes assert() and YOUR_OWN_ASSERT()-like macros.
  • It recognizes likely()/unlikely() and YOUR_OWN_LIKELY()-like macros.
  • It recognizes IS_ERROR(), SUCCEEDED(), and similar macros for error handling.
  • It recognizes specific patterns in type/variable names, like FirstUppercased, ALL_UPPERCASED, and typename_t, these can be specified in themes and styled differently.
  • It recognizes error constants like libc's ESOMETHING, kErr..., kError..., and ERROR_....
  • It recognizes success constants like noErr, ERROR_OK, kNoErr, kErrorOk, etc...
  • Constants representing success and failure and can be highlighted differently.
  • Many other improvements you may find useful.

License

This extension is based on official VSCode C/C++ tokenizer/grammar (which is based on textmate-cpp tokenizer/grammar), additions are licensed under MIT.

About

[VSCode] C/C++ must-have highlighter that understands many coding styles and APIs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published