This repository has been archived by the owner on Sep 8, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make lexing of class-like identifiers more consistent in C++ lexer (r…
…ouge-ruby#1495) Rouge's C++ lexer currently tokenises identifiers that come after the class keyword with the `Name::Class` token and identifiers that come after the `struct` keyword with the generic `Name` token. This is despite the fact that the only difference between a struct and a class in C++ is the default access specifier. Similarly, when used in a template definition, a typename is equivalent to a class but Rouge treats the identifiers that follow the `typename` and `class` keywords differently. This commit addresses this problem. It treats class and struct as equivalent in all cases while treating typename as equivalent when used in a template definition.
- Loading branch information