data: basic template parsing
* Implemented basic parsing and storage of template parameter types, template classes and template functions * Added template specialization edge. * Implemented handling of partial specializations. Needs some more tweaking. * Added a lot of test code for template stuff (still needs some cases to be tested) * Removed the isTemplateParameterType from DataType, since it shouldn't be needed * Function qualTypeToDataType uses clang PrintingPolicy to fetch the desired format. * Merged a lot of code for getting the correct names and name hierarchies of definitions * Removed TokenComponentDataType * Merged both of the Storage::addTypeEdge(...) functions * Added "-fno-delayed-template-parsing" flag to parser for parsing test code.
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
#include "data/graph/token_component/TokenComponentDataType.h"
|
||||
|
||||
#include "data/type/DataType.h"
|
||||
|
||||
TokenComponentDataType::TokenComponentDataType(
|
||||
const DataTypeQualifierList qualifierList, const DataTypeModifierStack modifierStack
|
||||
)
|
||||
: m_qualifierList(qualifierList)
|
||||
, m_modifierStack(modifierStack)
|
||||
{
|
||||
}
|
||||
|
||||
TokenComponentDataType::~TokenComponentDataType()
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<TokenComponent> TokenComponentDataType::copy() const
|
||||
{
|
||||
return std::make_shared<TokenComponentDataType>(*this);
|
||||
}
|
||||
|
||||
DataType TokenComponentDataType::getDataType(const std::string& typeName) const
|
||||
{
|
||||
return DataType(typeName, m_qualifierList, m_modifierStack);
|
||||
}
|
||||
|
||||
std::string TokenComponentDataType::getQualifiedTypeName(const std::string& typeName) const
|
||||
{
|
||||
return m_modifierStack.applyTo(m_qualifierList.applyTo(typeName));
|
||||
}
|
||||
|
||||
bool TokenComponentDataType::isConstQualified() const
|
||||
{
|
||||
return m_qualifierList.hasQualifier(DataTypeQualifierList::QUALIFIER_CONST);
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
#ifndef TOKEN_COMPONENT_DATA_TYPE_H
|
||||
#define TOKEN_COMPONENT_DATA_TYPE_H
|
||||
|
||||
#include "data/graph/token_component/TokenComponent.h"
|
||||
#include "data/type/DataTypeModifierStack.h"
|
||||
#include "data/type/DataTypeQualifierList.h"
|
||||
|
||||
class DataType;
|
||||
|
||||
class TokenComponentDataType
|
||||
: public TokenComponent
|
||||
{
|
||||
public:
|
||||
TokenComponentDataType(const DataTypeQualifierList qualifierList, const DataTypeModifierStack modifierStack);
|
||||
virtual ~TokenComponentDataType();
|
||||
|
||||
virtual std::shared_ptr<TokenComponent> copy() const;
|
||||
|
||||
DataType getDataType(const std::string& typeName) const;
|
||||
std::string getQualifiedTypeName(const std::string& typeName) const;
|
||||
|
||||
bool isConstQualified() const;
|
||||
|
||||
private:
|
||||
const DataTypeQualifierList m_qualifierList;
|
||||
const DataTypeModifierStack m_modifierStack;
|
||||
};
|
||||
|
||||
#endif // TOKEN_COMPONENT_DATA_TYPE_H
|
||||
Reference in New Issue
Block a user