Extracts the actual name part of an enum instance In other words, it returns the Blue part of Bikeshed::Colour::Blue
| 10468 | // Extracts the actual name part of an enum instance |
| 10469 | // In other words, it returns the Blue part of Bikeshed::Colour::Blue |
| 10470 | StringRef extractInstanceName(StringRef enumInstance) { |
| 10471 | // Find last occurence of ":" |
| 10472 | size_t name_start = enumInstance.size(); |
| 10473 | while (name_start > 0 && enumInstance[name_start - 1] != ':') { |
| 10474 | --name_start; |
| 10475 | } |
| 10476 | return enumInstance.substr(name_start, enumInstance.size() - name_start); |
| 10477 | } |
| 10478 | } |
| 10479 | |
| 10480 | std::vector<StringRef> parseEnums( StringRef enums ) { |
no test coverage detected