data: Parsing Typedefs with ParseTypeUsage
With this change typedefs have two TokenLocations, one for the TypeName and one for the UnderlyingType. When the typedef is used with a variable the typedef is referenced now and not the underlying type.
This commit is contained in:
@@ -2,6 +2,16 @@
|
||||
|
||||
namespace utility
|
||||
{
|
||||
std::string substrAfter(const std::string& str, char delimiter)
|
||||
{
|
||||
size_t pos = str.find(delimiter);
|
||||
if (pos != std::string::npos)
|
||||
{
|
||||
return str.substr(pos + 1, str.size());
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
bool isPrefix(const std::string& prefix, const std::string& text)
|
||||
{
|
||||
typedef std::pair<std::string::const_iterator, std::string::const_iterator> ResType;
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace utility
|
||||
template<typename ContainerType = std::vector<std::string>>
|
||||
ContainerType split(const std::string& str, const std::string& delimiter);
|
||||
|
||||
std::string substrAfter(const std::string& str, char delimiter);
|
||||
|
||||
bool isPrefix(const std::string& prefix, const std::string& text);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user