Better C++ Syntax Highlighting - Part 8: Qualifiers

Similar to type names, qualifiers on functions and types (such as namespaces and other class names) are annotated as plain tokens in browser-based syntax highlighters. This post introduces a technique to traverse the qualifier chain of an AST node and addresses the challenges of adding annotations for each qualifier.

Better C++ Syntax Highlighting - Part 7: Types

Earlier posts in this series focused only on the declarations of types. References to types, such as in variable declarations, function parameters, and return statements, often appear as plain text in browser-based syntax highlighters. This post implements a dedicated visitor to annotate these type references, ensuring every type name is styled consistently.

Better C++ Syntax Highlighting - Part 2: Enums

Enum definitions and constants can be hard to distinguish in complex C++ code, often going completely overlooked in browser syntax highlighting. This post introduces the basic structure of a visitor for the Clang AST and implements several visitors for annotating enums and their values.