Extracts the actual name part of an enum instance In other words, it returns the Blue part of Bikeshed::Colour::Blue
| 10590 | // Extracts the actual name part of an enum instance |
| 10591 | // In other words, it returns the Blue part of Bikeshed::Colour::Blue |
| 10592 | StringRef extractInstanceName(StringRef enumInstance) { |
| 10593 | // Find last occurrence of ":" |
| 10594 | size_t name_start = enumInstance.size(); |
| 10595 | while (name_start > 0 && enumInstance[name_start - 1] != ':') { |
| 10596 | --name_start; |
| 10597 | } |
| 10598 | return enumInstance.substr(name_start, enumInstance.size() - name_start); |
| 10599 | } |
| 10600 | } |
| 10601 | |
| 10602 | std::vector<StringRef> parseEnums( StringRef enums ) { |
no test coverage detected