top | up | prev | next

SymbolTable Class

Definition at line 33 of SymbolTable.hpp

Constructors

SymbolTable()

Member Functions

void AddEnumerator(EnumeratorNode* enumeratorNode, const std::u32string& enumeratorName, const std::u32string& enumeratorValue)
void AddParameter(ParameterNode* parameterNode, const std::u32string& parameterName)
RuleSymbol* AddRule(const Span& span, const std::u32string& ruleName)
void AddTypedef(TypedefNode* node, const std::u32string& typedefName, const std::u32string& projectName)
void AddVariable(Node* node, const std::u32string& variableName, const std::u32string& projectName)
void BeginClass(ClassNode* classNode, const std::u32string& className, std::vector<std::unique_ptr<TypeSymbol>>& templateParameters, const std::u32string& projectName)
void BeginContainer(ContainerSymbol* container_)
void BeginDeclarationBlock(Node* blockNode)
void BeginEnumType(EnumTypeNode* enumTypeNode, const std::u32string& enumTypeName, const std::u32string& projectName)
void BeginFunction(FunctionDeclaratorNode* functionDeclaratorNode, const std::u32string& groupName, const std::u32string& functionName, std::vector<std::unique_ptr<TypeSymbol>>& templateParameters, Specifier specifiers, const std::u32string& projectName)
void BeginFunctionDeclaration(FunctionDeclaratorNode* functionDeclaratorNode, const std::u32string& groupName, const std::u32string& functionName, std::vector<std::unique_ptr<TypeSymbol>>& templateParameters, Specifier specifiers, const std::u32string& projectName)
void BeginGrammar(const Span& span, const std::u32string& grammarName, const std::u32string& projectName)
void BeginLambdaExpression(LambdaExpressionNode* lambdaExpressionNode)
int BeginNameSequence(const std::vector<std::pair<std::u32string, int>>& nameSequence)
void BeginNamespace(const std::u32string& namespaceName, const std::u32string& projectName)
std::unique_ptr<sngxml::dom::Element> CreateTypesElement()
void EndClass(const std::u32string& projectName)
void EndContainer()
void EndDeclarationBlock()
void EndEnumType(const std::u32string& projectName)
void EndFunction(const std::u32string& projectName)
void EndFunctionDeclaration()
void EndGrammar(const std::u32string& projectName)
void EndLambdaExpression()
void EndNameSequence(int n)
void EndNamespace()
TypeSymbol* GetBoolType()
TypeSymbol* GetChar16Type()
TypeSymbol* GetChar32Type()
TypeSymbol* GetCharType()
ContainerScope* GetContainerScope()
TypeSymbol* GetDoubleType()
const std::vector<IdentifierNode*>& GetIdNodeSequence(Node* node)
TypeSymbol* GetIntType()
TypeSymbol* GetLongType()
Symbol* GetSymbol(Node* node)
Symbol* GetSymbolNothrow(Node* node)
const std::vector<Node*>& GetTemplateArgumentNodes(TemplateIdNode* templateIdNode)
TypeSymbol* GetUIntType()
TypeSymbol* GetVoidType()
NamespaceSymbol* GlobalNs()
bool InGendocMode() const
TypeSymbol* MakeClassGroupTypeSymbol(ClassGroupSymbol* classGroup)
TypeSymbol* MakeClassTemplateSpecializationSymbol(const Span& span, TypeSymbol* primaryClassTemplate, const std::vector<TypeSymbol*>& templateArguments)
TypeSymbol* MakeDerivedTypeSymbol(std::vector<Derivation>& derivations, TypeSymbol* baseType)
TypeSymbol* MakeElaborateClassTypeSymbol(ClassKey classKey, TypeSymbol* classType)
TypeSymbol* MakeExternalTypeSymbol(const Span& span, const std::u32string& name, ClassKey classKey)
TypeSymbol* MakeIntegerLiteralTypeSymbol(const Span& span, const std::u32string& valueName)
TypeSymbol* MakeSimpleTypeSymbol(SimpleTypeNode& simpleTypeNode)
void MapIdNodeSequence(Node* node, const std::vector<IdentifierNode*>& idNodeSequence)
void MapNode(Node* node, Symbol* symbol)
void MapTemplateIdToTemplateArgumentNodes(TemplateIdNode* templateIdNode, const std::vector<Node*>& templateArgumentNodes)
void SetGendocMode()
std::unique_ptr<sngxml::dom::Document> ToDomDocument()
std::unique_ptr<sngxml::dom::Element> ToDomElement()

Member Variables

int blockNumber
ContainerSymbol* container
std::stack<ContainerSymbol*> containerStack
bool gendocMode
NamespaceSymbol globalNs
std::unordered_map<Node*, std::vector<IdentifierNode*>> idNodeSequenceMap
std::unordered_map<std::u32string, TypeSymbol*> idTypeMap
std::unordered_map<Node*, Symbol*> nodeSymbolMap
std::vector<std::unique_ptr<Node>> ownedNodes
std::unordered_map<TemplateIdNode*, std::vector<Node*>> templateIdTemplateArgumentNodeMap
std::vector<std::unique_ptr<TypeSymbol>> types

Constructor Details

SymbolTable Constructor

sngcpp::symbols::SymbolTable::SymbolTable()

Definition at line 25 of SymbolTable.cpp :
 25 : globalNs(Span()U"")container(&globalNs)blockNumber(0)gendocMode(false)
 26 {
 27     globalNs.SetAccess(Specifier::public_);
 28 }


Declaration at line 36 of SymbolTable.hpp


Member Function Details

AddEnumerator Member Function

void sngcpp::symbols::SymbolTable::AddEnumerator(EnumeratorNode * enumeratorNode, const std::u32string& enumeratorName, const std::u32string& enumeratorValue)

Definition at line 261 of SymbolTable.cpp :
262 {
263     EnumeratorSymbol* enumeratorSymbol = new EnumeratorSymbol(enumeratorNode->GetSpan()enumeratorNameenumeratorValue);
264     MapNode(enumeratorNodeenumeratorSymbol);
265     container->AddMember(std::unique_ptr<Symbol>(enumeratorSymbol));
266 }


Declaration at line 55 of SymbolTable.hpp

Calls: sngcpp::ast::Node::GetSpan , sngcpp::symbols::ContainerSymbol::AddMember , sngcpp::symbols::SymbolTable::MapNode

Called by: sngcpp::symbols::SymbolCreator::Visit


AddParameter Member Function

void sngcpp::symbols::SymbolTable::AddParameter(ParameterNode * parameterNode, const std::u32string& parameterName)

Definition at line 348 of SymbolTable.cpp :
349 {
350     ParameterSymbol* parameterSymbol = new ParameterSymbol(parameterNode->GetSpan()parameterName);
351     parameterSymbol->SetAccess(Specifier::public_);
352     MapNode(parameterNodeparameterSymbol);
353     container->AddMember(std::unique_ptr<Symbol>(parameterSymbol));
354 }


Declaration at line 62 of SymbolTable.hpp

Calls: sngcpp::ast::Node::GetSpan , sngcpp::symbols::ContainerSymbol::AddMember , sngcpp::symbols::Symbol::SetAccess , sngcpp::symbols::SymbolTable::MapNode

Called by: sngcpp::symbols::SymbolCreator::Visit


AddRule Member Function

RuleSymbol * sngcpp::symbols::SymbolTable::AddRule(const Span& span, const std::u32string& ruleName)

Definition at line 234 of SymbolTable.cpp :
235 {
236     RuleSymbol* rule = new RuleSymbol(spanruleName);
237     container->AddMember(std::unique_ptr<Symbol>(rule));
238     return rule;
239 }


Declaration at line 52 of SymbolTable.hpp

Calls: sngcpp::symbols::ContainerSymbol::AddMember


AddTypedef Member Function

void sngcpp::symbols::SymbolTable::AddTypedef(TypedefNode * node, const std::u32string& typedefName, const std::u32string& projectName)

Definition at line 371 of SymbolTable.cpp
Declaration at line 65 of SymbolTable.hpp

Calls: sngcpp::ast::Node::GetSpan , sngcpp::symbols::ContainerSymbol::AddMember , sngcpp::symbols::NamespaceSymbol::AddProject , sngcpp::symbols::Symbol::IsNamespaceSymbol , sngcpp::symbols::Symbol::Name , sngcpp::symbols::Symbol::SetProjectName , sngcpp::symbols::SymbolTable::MapNode

Called by: sngcpp::symbols::SymbolCreator::Visit


AddVariable Member Function

void sngcpp::symbols::SymbolTable::AddVariable(Node * node, const std::u32string& variableName, const std::u32string& projectName)

Definition at line 384 of SymbolTable.cpp
Declaration at line 66 of SymbolTable.hpp

Calls: sngcpp::ast::Node::GetSpan , sngcpp::symbols::ContainerScope::Lookup , sngcpp::symbols::ContainerSymbol::AddMember , sngcpp::symbols::ContainerSymbol::GetContainerScope , sngcpp::symbols::NamespaceSymbol::AddProject , sngcpp::symbols::Symbol::IsNamespaceSymbol , sngcpp::symbols::Symbol::Name , sngcpp::symbols::Symbol::SetProjectName , sngcpp::symbols::SymbolTable::MapNode

Called by: sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit


BeginClass Member Function

void sngcpp::symbols::SymbolTable::BeginClass(ClassNode * classNode, const std::u32string& className, std::vector<std::unique_ptr<TypeSymbol >>& templateParameters, const std::u32string& projectName)

Definition at line 174 of SymbolTable.cpp :
175 {
176     ClassTypeSymbol* classType = new ClassTypeSymbol(classNode->GetSpan()classNameclassNode->GetClassKey());
177     classType->SetProjectName(projectName);
178     MapNode(classNodeclassType);
179     for (std::std::unique_ptr<TypeSymbol>&templateParameter : templateParameters)
180     {
181         classType->AddTemplateParameter(std::move(templateParameter));
182     }
183     BeginContainer(classType);
184 }


Declaration at line 46 of SymbolTable.hpp

Calls: sngcpp::ast::ClassNode::GetClassKey , sngcpp::ast::Node::GetSpan , sngcpp::symbols::ClassTypeSymbol::AddTemplateParameter , sngcpp::symbols::Symbol::SetProjectName , sngcpp::symbols::SymbolTable::BeginContainer , sngcpp::symbols::SymbolTable::MapNode

Called by: sngcpp::symbols::SymbolCreator::Visit


BeginContainer Member Function

void sngcpp::symbols::SymbolTable::BeginContainer(ContainerSymbol * container_)

Definition at line 71 of SymbolTable.cpp :
 72 {
 73     containerStack.push(container);
 74     container = container_;
 75 }


Declaration at line 40 of SymbolTable.hpp

Called by: sngcpp::symbols::SymbolTable::BeginClass , sngcpp::symbols::SymbolTable::BeginDeclarationBlock , sngcpp::symbols::SymbolTable::BeginEnumType , sngcpp::symbols::SymbolTable::BeginFunction , sngcpp::symbols::SymbolTable::BeginFunctionDeclaration , sngcpp::symbols::SymbolTable::BeginGrammar , sngcpp::symbols::SymbolTable::BeginLambdaExpression , sngcpp::symbols::SymbolTable::BeginNameSequence , sngcpp::symbols::SymbolTable::BeginNamespace , sngcpp::symbols::SymbolTable::MakeClassTemplateSpecializationSymbol


BeginDeclarationBlock Member Function

void sngcpp::symbols::SymbolTable::BeginDeclarationBlock(Node * blockNode)

Definition at line 356 of SymbolTable.cpp :
357 {
358     DeclarationBlockSymbol* declarationBlock = new DeclarationBlockSymbol(blockNode->GetSpan()U"block" + ToUtf32(std::to_string(blockNumber++)));
359     declarationBlock->SetAccess(Specifier::public_);
360     MapNode(blockNodedeclarationBlock);
361     BeginContainer(declarationBlock);
362 }


Declaration at line 63 of SymbolTable.hpp

Calls: sngcpp::ast::Node::GetSpan , sngcpp::symbols::Symbol::SetAccess , sngcpp::symbols::SymbolTable::BeginContainer , sngcpp::symbols::SymbolTable::MapNode

Called by: sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit


BeginEnumType Member Function

void sngcpp::symbols::SymbolTable::BeginEnumType(EnumTypeNode * enumTypeNode, const std::u32string& enumTypeName, const std::u32string& projectName)

Definition at line 241 of SymbolTable.cpp :
242 {
243     EnumTypeSymbol* enumType = new EnumTypeSymbol(enumTypeNode->GetSpan()enumTypeNameenumTypeNode->GetEnumKey());
244     enumType->SetProjectName(projectName);
245     MapNode(enumTypeNodeenumType);
246     BeginContainer(enumType);
247 }


Declaration at line 53 of SymbolTable.hpp

Calls: sngcpp::ast::EnumTypeNode::GetEnumKey , sngcpp::ast::Node::GetSpan , sngcpp::symbols::Symbol::SetProjectName , sngcpp::symbols::SymbolTable::BeginContainer , sngcpp::symbols::SymbolTable::MapNode

Called by: sngcpp::symbols::SymbolCreator::Visit


BeginFunction Member Function

void sngcpp::symbols::SymbolTable::BeginFunction(FunctionDeclaratorNode * functionDeclaratorNode, const std::u32string& groupName, const std::u32string& functionName, std::vector<std::unique_ptr<TypeSymbol >>& templateParameters, Specifier specifiers, const std::u32string& projectName)

Definition at line 268 of SymbolTable.cpp
Declaration at line 56 of SymbolTable.hpp

Calls: sngcpp::ast::Node::GetSpan , sngcpp::symbols::FunctionSymbol::AddTemplateParameter , sngcpp::symbols::Symbol::IsClassTypeSymbol , sngcpp::symbols::Symbol::Name , sngcpp::symbols::Symbol::SetProjectName , sngcpp::symbols::SymbolTable::BeginContainer , sngcpp::symbols::SymbolTable::MapNode

Called by: sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolTable::MakeClassTemplateSpecializationSymbol


BeginFunctionDeclaration Member Function

void sngcpp::symbols::SymbolTable::BeginFunctionDeclaration(FunctionDeclaratorNode * functionDeclaratorNode, const std::u32string& groupName, const std::u32string& functionName, std::vector<std::unique_ptr<TypeSymbol >>& templateParameters, Specifier specifiers, const std::u32string& projectName)

Definition at line 314 of SymbolTable.cpp
Declaration at line 59 of SymbolTable.hpp

Calls: sngcpp::ast::Node::GetSpan , sngcpp::symbols::FunctionDeclarationSymbol::AddTemplateParameter , sngcpp::symbols::Symbol::IsClassTypeSymbol , sngcpp::symbols::Symbol::Name , sngcpp::symbols::Symbol::SetProjectName , sngcpp::symbols::SymbolTable::BeginContainer , sngcpp::symbols::SymbolTable::MapNode

Called by: sngcpp::symbols::SymbolCreator::Visit


BeginGrammar Member Function

void sngcpp::symbols::SymbolTable::BeginGrammar(const Span& span, const std::u32string& grammarName, const std::u32string& projectName)

Definition at line 215 of SymbolTable.cpp :
216 {
217     GrammarSymbol* grammar = new GrammarSymbol(spangrammarName);
218     grammar->SetProjectName(projectName);
219     BeginContainer(grammar);
220 }


Declaration at line 50 of SymbolTable.hpp

Calls: sngcpp::symbols::Symbol::SetProjectName , sngcpp::symbols::SymbolTable::BeginContainer


BeginLambdaExpression Member Function

void sngcpp::symbols::SymbolTable::BeginLambdaExpression(LambdaExpressionNode * lambdaExpressionNode)

Definition at line 201 of SymbolTable.cpp :
202 {
203     LambdaExpressionSymbol* lambdaExpression = new LambdaExpressionSymbol(lambdaExpressionNode->GetSpan());
204     MapNode(lambdaExpressionNodelambdaExpression);
205     BeginContainer(lambdaExpression);
206 }


Declaration at line 48 of SymbolTable.hpp

Calls: sngcpp::ast::Node::GetSpan , sngcpp::symbols::SymbolTable::BeginContainer , sngcpp::symbols::SymbolTable::MapNode

Called by: sngcpp::symbols::SymbolCreator::Visit


BeginNameSequence Member Function

int sngcpp::symbols::SymbolTable::BeginNameSequence(const std::vector<std::pair<std::u32string, int >>& nameSequence)

Definition at line 83 of SymbolTable.cpp
Declaration at line 42 of SymbolTable.hpp

Calls: sngcpp::symbols::ClassGroupSymbol::GetClass , sngcpp::symbols::ContainerScope::Lookup , sngcpp::symbols::ContainerSymbol::GetContainerScope , sngcpp::symbols::Symbol::IsClassGroupSymbol , sngcpp::symbols::Symbol::IsContainerSymbol , sngcpp::symbols::SymbolTable::BeginContainer

Called by: sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit


BeginNamespace Member Function

void sngcpp::symbols::SymbolTable::BeginNamespace(const std::u32string& namespaceName, const std::u32string& projectName)

Definition at line 129 of SymbolTable.cpp
Declaration at line 44 of SymbolTable.hpp

Calls: sngcpp::symbols::ContainerScope::Lookup , sngcpp::symbols::ContainerSymbol::AddMember , sngcpp::symbols::ContainerSymbol::GetContainerScope , sngcpp::symbols::NamespaceSymbol::AddProject , sngcpp::symbols::Symbol::IsNamespaceSymbol , sngcpp::symbols::SymbolTable::BeginContainer

Called by: sngcpp::symbols::SymbolCreator::Visit


CreateTypesElement Member Function

std::unique_ptr<sngxml::dom::Element> sngcpp::symbols::SymbolTable::CreateTypesElement()

Definition at line 50 of SymbolTable.cpp
Declaration at line 39 of SymbolTable.hpp

Calls: sngcpp::symbols::Symbol::ToDomElement

Called by: sngcpp::symbols::SymbolTable::ToDomElement


EndClass Member Function

void sngcpp::symbols::SymbolTable::EndClass(const std::u32string& projectName)

Definition at line 186 of SymbolTable.cpp
Declaration at line 47 of SymbolTable.hpp

Calls: sngcpp::symbols::ContainerSymbol::AddMember , sngcpp::symbols::NamespaceSymbol::AddProject , sngcpp::symbols::Symbol::IsNamespaceSymbol , sngcpp::symbols::Symbol::Name , sngcpp::symbols::SymbolTable::EndContainer

Called by: sngcpp::symbols::SymbolCreator::Visit


EndContainer Member Function

void sngcpp::symbols::SymbolTable::EndContainer()

Definition at line 77 of SymbolTable.cpp :
 78 {
 79     container = containerStack.top();
 80     containerStack.pop();
 81 }


Declaration at line 41 of SymbolTable.hpp

Called by: sngcpp::symbols::SymbolTable::EndClass , sngcpp::symbols::SymbolTable::EndDeclarationBlock , sngcpp::symbols::SymbolTable::EndEnumType , sngcpp::symbols::SymbolTable::EndFunction , sngcpp::symbols::SymbolTable::EndFunctionDeclaration , sngcpp::symbols::SymbolTable::EndGrammar , sngcpp::symbols::SymbolTable::EndLambdaExpression , sngcpp::symbols::SymbolTable::EndNameSequence , sngcpp::symbols::SymbolTable::EndNamespace , sngcpp::symbols::SymbolTable::MakeClassTemplateSpecializationSymbol


EndDeclarationBlock Member Function

void sngcpp::symbols::SymbolTable::EndDeclarationBlock()

Definition at line 364 of SymbolTable.cpp :
365 {
366     DeclarationBlockSymbol* declarationBlock = static_cast<DeclarationBlockSymbol*>(container);
367     EndContainer();
368     container->AddMember(std::unique_ptr<Symbol>(declarationBlock));
369 }


Declaration at line 64 of SymbolTable.hpp

Calls: sngcpp::symbols::ContainerSymbol::AddMember , sngcpp::symbols::SymbolTable::EndContainer

Called by: sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit


EndEnumType Member Function

void sngcpp::symbols::SymbolTable::EndEnumType(const std::u32string& projectName)

Definition at line 249 of SymbolTable.cpp :
250 {
251     EnumTypeSymbol* enumType = static_cast<EnumTypeSymbol*>(container);
252     EndContainer();
253     container->AddMember(std::unique_ptr<Symbol>(enumType));
254     if (container->IsNamespaceSymbol() && container->Name() == U"")
255     {
256         NamespaceSymbol* ns = static_cast<NamespaceSymbol*>(container);
257         ns->AddProject(projectName);
258     }
259 }


Declaration at line 54 of SymbolTable.hpp

Calls: sngcpp::symbols::ContainerSymbol::AddMember , sngcpp::symbols::NamespaceSymbol::AddProject , sngcpp::symbols::Symbol::IsNamespaceSymbol , sngcpp::symbols::Symbol::Name , sngcpp::symbols::SymbolTable::EndContainer

Called by: sngcpp::symbols::SymbolCreator::Visit


EndFunction Member Function

void sngcpp::symbols::SymbolTable::EndFunction(const std::u32string& projectName)

Definition at line 302 of SymbolTable.cpp :
303 {
304     FunctionSymbol* functionSymbol = static_cast<FunctionSymbol*>(container);
305     EndContainer();
306     container->AddMember(std::unique_ptr<Symbol>(functionSymbol));
307     if (container->IsNamespaceSymbol() && container->Name() == U"")
308     {
309         NamespaceSymbol* ns = static_cast<NamespaceSymbol*>(container);
310         ns->AddProject(projectName);
311     }
312 }


Declaration at line 58 of SymbolTable.hpp

Calls: sngcpp::symbols::ContainerSymbol::AddMember , sngcpp::symbols::NamespaceSymbol::AddProject , sngcpp::symbols::Symbol::IsNamespaceSymbol , sngcpp::symbols::Symbol::Name , sngcpp::symbols::SymbolTable::EndContainer

Called by: sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolTable::MakeClassTemplateSpecializationSymbol


EndFunctionDeclaration Member Function

void sngcpp::symbols::SymbolTable::EndFunctionDeclaration()

Definition at line 341 of SymbolTable.cpp :
342 {
343     FunctionDeclarationSymbol* functionDeclarationSymbol = static_cast<FunctionDeclarationSymbol*>(container);
344     EndContainer();
345     container->AddMember(std::unique_ptr<Symbol>(functionDeclarationSymbol));
346 }


Declaration at line 61 of SymbolTable.hpp

Calls: sngcpp::symbols::ContainerSymbol::AddMember , sngcpp::symbols::SymbolTable::EndContainer

Called by: sngcpp::symbols::SymbolCreator::Visit


EndGrammar Member Function

void sngcpp::symbols::SymbolTable::EndGrammar(const std::u32string& projectName)

Definition at line 222 of SymbolTable.cpp :
223 {
224     GrammarSymbol* grammar = static_cast<GrammarSymbol*>(container);
225     EndContainer();
226     container->AddMember(std::unique_ptr<Symbol>(grammar));
227     if (container->IsNamespaceSymbol() && container->Name() == U"")
228     {
229         NamespaceSymbol* ns = static_cast<NamespaceSymbol*>(container);
230         ns->AddProject(projectName);
231     }
232 }


Declaration at line 51 of SymbolTable.hpp

Calls: sngcpp::symbols::ContainerSymbol::AddMember , sngcpp::symbols::NamespaceSymbol::AddProject , sngcpp::symbols::Symbol::IsNamespaceSymbol , sngcpp::symbols::Symbol::Name , sngcpp::symbols::SymbolTable::EndContainer


EndLambdaExpression Member Function

void sngcpp::symbols::SymbolTable::EndLambdaExpression()

Definition at line 208 of SymbolTable.cpp :
209 {
210     LambdaExpressionSymbol* lambdaExpression = static_cast<LambdaExpressionSymbol*>(container);
211     EndContainer();
212     container->AddMember(std::unique_ptr<Symbol>(lambdaExpression));
213 }


Declaration at line 49 of SymbolTable.hpp

Calls: sngcpp::symbols::ContainerSymbol::AddMember , sngcpp::symbols::SymbolTable::EndContainer

Called by: sngcpp::symbols::SymbolCreator::Visit


EndNameSequence Member Function

void sngcpp::symbols::SymbolTable::EndNameSequence(int n)

Definition at line 121 of SymbolTable.cpp :
122 {
123     for (int i = 0; i < n; ++i)
124     {
125         EndContainer();
126     }
127 }


Declaration at line 43 of SymbolTable.hpp

Calls: sngcpp::symbols::SymbolTable::EndContainer

Called by: sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit , sngcpp::symbols::SymbolCreator::Visit


EndNamespace Member Function

void sngcpp::symbols::SymbolTable::EndNamespace()

Definition at line 169 of SymbolTable.cpp :
170 {
171     EndContainer();
172 }


Declaration at line 45 of SymbolTable.hpp

Calls: sngcpp::symbols::SymbolTable::EndContainer

Called by: sngcpp::symbols::SymbolCreator::Visit


GetBoolType Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::GetBoolType()

Definition at line 477 of SymbolTable.cpp :
478 {
479     SimpleTypeNode boolNode(soulng::lexer::Span()std::vector<SimpleTypeSpecifier>(1SimpleTypeSpecifier::bool_));
480     return MakeSimpleTypeSymbol(boolNode);
481 }


Declaration at line 76 of SymbolTable.hpp

Calls: sngcpp::symbols::SymbolTable::MakeSimpleTypeSymbol


GetChar16Type Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::GetChar16Type()

Definition at line 516 of SymbolTable.cpp :
517 {
518     SimpleTypeNode char16Node(soulng::lexer::Span()std::vector<SimpleTypeSpecifier>(1SimpleTypeSpecifier::char16));
519     return MakeSimpleTypeSymbol(char16Node);
520 }


Declaration at line 82 of SymbolTable.hpp

Calls: sngcpp::symbols::SymbolTable::MakeSimpleTypeSymbol


GetChar32Type Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::GetChar32Type()

Definition at line 522 of SymbolTable.cpp :
523 {
524     SimpleTypeNode char32Node(soulng::lexer::Span()std::vector<SimpleTypeSpecifier>(1SimpleTypeSpecifier::char32));
525     return MakeSimpleTypeSymbol(char32Node);
526 }


Declaration at line 83 of SymbolTable.hpp

Calls: sngcpp::symbols::SymbolTable::MakeSimpleTypeSymbol


GetCharType Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::GetCharType()

Definition at line 510 of SymbolTable.cpp :
511 {
512     SimpleTypeNode charNode(soulng::lexer::Span()std::vector<SimpleTypeSpecifier>(1SimpleTypeSpecifier::char_));
513     return MakeSimpleTypeSymbol(charNode);
514 }


Declaration at line 81 of SymbolTable.hpp

Calls: sngcpp::symbols::SymbolTable::MakeSimpleTypeSymbol


GetContainerScope Member Function

ContainerScope * sngcpp::symbols::SymbolTable::GetContainerScope()

Definition at line 472 of SymbolTable.cpp :
473 {
474     return container->GetContainerScope();
475 }


Declaration at line 75 of SymbolTable.hpp

Calls: sngcpp::symbols::ContainerSymbol::GetContainerScope


GetDoubleType Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::GetDoubleType()

Definition at line 489 of SymbolTable.cpp :
490 {
491     SimpleTypeNode doubleNode(soulng::lexer::Span()std::vector<SimpleTypeSpecifier>(1SimpleTypeSpecifier::double_));
492     return MakeSimpleTypeSymbol(doubleNode);
493 }


Declaration at line 78 of SymbolTable.hpp

Calls: sngcpp::symbols::SymbolTable::MakeSimpleTypeSymbol


GetIdNodeSequence Member Function

const std::vector<IdentifierNode *>& sngcpp::symbols::SymbolTable::GetIdNodeSequence(Node * node)

Definition at line 446 of SymbolTable.cpp
Declaration at line 72 of SymbolTable.hpp


GetIntType Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::GetIntType()

Definition at line 495 of SymbolTable.cpp :
496 {
497     SimpleTypeNode intNode(soulng::lexer::Span()std::vector<SimpleTypeSpecifier>(1SimpleTypeSpecifier::int_));
498     return MakeSimpleTypeSymbol(intNode);
499 }


Declaration at line 79 of SymbolTable.hpp

Calls: sngcpp::symbols::SymbolTable::MakeSimpleTypeSymbol


GetLongType Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::GetLongType()

Definition at line 483 of SymbolTable.cpp :
484 {
485     SimpleTypeNode longNode(soulng::lexer::Span()std::vector<SimpleTypeSpecifier>(1SimpleTypeSpecifier::long_));
486     return MakeSimpleTypeSymbol(longNode);
487 }


Declaration at line 77 of SymbolTable.hpp

Calls: sngcpp::symbols::SymbolTable::MakeSimpleTypeSymbol


GetSymbol Member Function

Symbol * sngcpp::symbols::SymbolTable::GetSymbol(Node * node)

Definition at line 433 of SymbolTable.cpp
Declaration at line 71 of SymbolTable.hpp

Calls: sngcpp::symbols::SymbolTable::GetSymbolNothrow


GetSymbolNothrow Member Function

Symbol * sngcpp::symbols::SymbolTable::GetSymbolNothrow(Node * node)

Definition at line 420 of SymbolTable.cpp
Declaration at line 70 of SymbolTable.hpp

Called by: sngcpp::symbols::SymbolTable::GetSymbol


GetTemplateArgumentNodes Member Function

const std::vector<Node *>& sngcpp::symbols::SymbolTable::GetTemplateArgumentNodes(TemplateIdNode * templateIdNode)

Definition at line 459 of SymbolTable.cpp
Declaration at line 73 of SymbolTable.hpp


GetUIntType Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::GetUIntType()

Definition at line 501 of SymbolTable.cpp :
502 {
503     std::vector<SimpleTypeSpecifier> specifiers;
504     specifiers.push_back(SimpleTypeSpecifier::unsigned_);
505     specifiers.push_back(SimpleTypeSpecifier::int_);
506     SimpleTypeNode uintNode(soulng::lexer::Span()specifiers);
507     return MakeSimpleTypeSymbol(uintNode);
508 }


Declaration at line 80 of SymbolTable.hpp

Calls: sngcpp::symbols::SymbolTable::MakeSimpleTypeSymbol


GetVoidType Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::GetVoidType()

Definition at line 528 of SymbolTable.cpp :
529 {
530     SimpleTypeNode voidNode(soulng::lexer::Span()std::vector<SimpleTypeSpecifier>(1SimpleTypeSpecifier::void_));
531     return MakeSimpleTypeSymbol(voidNode);
532 }


Declaration at line 84 of SymbolTable.hpp

Calls: sngcpp::symbols::SymbolTable::MakeSimpleTypeSymbol


GlobalNs Member Function

NamespaceSymbol * sngcpp::symbols::SymbolTable::GlobalNs()

Definition at line 74 of SymbolTable.hpp :
 74 { return &globalNs; }


InGendocMode Member Function

bool sngcpp::symbols::SymbolTable::InGendocMode() const

Definition at line 93 of SymbolTable.hpp :
 93 { return gendocMode; }


MakeClassGroupTypeSymbol Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::MakeClassGroupTypeSymbol(ClassGroupSymbol * classGroup)

Definition at line 618 of SymbolTable.cpp
Declaration at line 89 of SymbolTable.hpp

Calls: sngcpp::symbols::Symbol::Id


MakeClassTemplateSpecializationSymbol Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::MakeClassTemplateSpecializationSymbol(const Span& span, TypeSymbol * primaryClassTemplate, const std::vector<TypeSymbol *>& templateArguments)

Definition at line 635 of SymbolTable.cpp
Declaration at line 90 of SymbolTable.hpp

Calls: sngcpp::symbols::FunctionSymbol::SetReturnType , sngcpp::symbols::Symbol::Name , sngcpp::symbols::Symbol::SetAccess , sngcpp::symbols::SymbolTable::BeginContainer , sngcpp::symbols::SymbolTable::BeginFunction , sngcpp::symbols::SymbolTable::EndContainer , sngcpp::symbols::SymbolTable::EndFunction , sngcpp::symbols::SymbolTable::MakeDerivedTypeSymbol , sngcpp::symbols::TypeSymbol::IsExternalTypeSymbol


MakeDerivedTypeSymbol Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::MakeDerivedTypeSymbol(std::vector<Derivation >& derivations, TypeSymbol * baseType)

Definition at line 570 of SymbolTable.cpp
Declaration at line 87 of SymbolTable.hpp

Calls: sngcpp::symbols::DerivedTypeSymbol::BaseType , sngcpp::symbols::DerivedTypeSymbol::Derivations , sngcpp::symbols::Symbol::GetSpan , sngcpp::symbols::Symbol::SetAccess , sngcpp::symbols::TypeSymbol::IsDerivedTypeSymbol

Called by: sngcpp::symbols::SymbolTable::MakeClassTemplateSpecializationSymbol


MakeElaborateClassTypeSymbol Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::MakeElaborateClassTypeSymbol(ClassKey classKey, TypeSymbol * classType)

Definition at line 552 of SymbolTable.cpp
Declaration at line 86 of SymbolTable.hpp

Calls: sngcpp::symbols::Symbol::GetSpan , sngcpp::symbols::Symbol::IdStr


MakeExternalTypeSymbol Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::MakeExternalTypeSymbol(const Span& span, const std::u32string& name, ClassKey classKey)

Definition at line 594 of SymbolTable.cpp
Declaration at line 88 of SymbolTable.hpp

Calls: sngcpp::symbols::Symbol::SetAccess


MakeIntegerLiteralTypeSymbol Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::MakeIntegerLiteralTypeSymbol(const Span& span, const std::u32string& valueName)

Definition at line 671 of SymbolTable.cpp
Declaration at line 91 of SymbolTable.hpp

Calls: sngcpp::symbols::Symbol::SetAccess


MakeSimpleTypeSymbol Member Function

TypeSymbol * sngcpp::symbols::SymbolTable::MakeSimpleTypeSymbol(SimpleTypeNode & simpleTypeNode)

Definition at line 534 of SymbolTable.cpp
Declaration at line 85 of SymbolTable.hpp

Calls: sngcpp::ast::Node::GetSpan , sngcpp::ast::SimpleTypeNode::Flags , sngcpp::ast::SimpleTypeNode::Id , sngcpp::ast::SimpleTypeNode::Str , sngcpp::symbols::Symbol::SetAccess

Called by: sngcpp::symbols::SymbolTable::GetBoolType , sngcpp::symbols::SymbolTable::GetChar16Type , sngcpp::symbols::SymbolTable::GetChar32Type , sngcpp::symbols::SymbolTable::GetCharType , sngcpp::symbols::SymbolTable::GetDoubleType , sngcpp::symbols::SymbolTable::GetIntType , sngcpp::symbols::SymbolTable::GetLongType , sngcpp::symbols::SymbolTable::GetUIntType , sngcpp::symbols::SymbolTable::GetVoidType


MapIdNodeSequence Member Function

void sngcpp::symbols::SymbolTable::MapIdNodeSequence(Node * node, const std::vector<IdentifierNode *>& idNodeSequence)

Definition at line 410 of SymbolTable.cpp :
411 {
412     idNodeSequenceMap[node] = idNodeSequence;
413 }


Declaration at line 68 of SymbolTable.hpp


MapNode Member Function

void sngcpp::symbols::SymbolTable::MapNode(Node * node, Symbol * symbol)

Definition at line 405 of SymbolTable.cpp :
406 {
407     nodeSymbolMap[node] = symbol;
408 }


Declaration at line 67 of SymbolTable.hpp

Called by: sngcpp::symbols::SymbolTable::AddEnumerator , sngcpp::symbols::SymbolTable::AddParameter , sngcpp::symbols::SymbolTable::AddTypedef , sngcpp::symbols::SymbolTable::AddVariable , sngcpp::symbols::SymbolTable::BeginClass , sngcpp::symbols::SymbolTable::BeginDeclarationBlock , sngcpp::symbols::SymbolTable::BeginEnumType , sngcpp::symbols::SymbolTable::BeginFunction , sngcpp::symbols::SymbolTable::BeginFunctionDeclaration , sngcpp::symbols::SymbolTable::BeginLambdaExpression


MapTemplateIdToTemplateArgumentNodes Member Function

void sngcpp::symbols::SymbolTable::MapTemplateIdToTemplateArgumentNodes(TemplateIdNode * templateIdNode, const std::vector<Node *>& templateArgumentNodes)

Definition at line 415 of SymbolTable.cpp :
416 {
417     templateIdTemplateArgumentNodeMap[templateIdNode] = templateArgumentNodes;
418 }


Declaration at line 69 of SymbolTable.hpp


SetGendocMode Member Function

void sngcpp::symbols::SymbolTable::SetGendocMode()

Definition at line 92 of SymbolTable.hpp :
 92 { gendocMode = true; }


ToDomDocument Member Function

std::unique_ptr<sngxml::dom::Document> sngcpp::symbols::SymbolTable::ToDomDocument()

Definition at line 30 of SymbolTable.cpp :
 31 {
 32     std::unique_ptr<sngxml::dom::Document> symbolTableDoc(new sngxml::dom::Document());
 33     symbolTableDoc->AppendChild(std::move(ToDomElement()));
 34     return symbolTableDoc;
 35 }


Declaration at line 37 of SymbolTable.hpp

Calls: sngcpp::symbols::SymbolTable::ToDomElement


ToDomElement Member Function

std::unique_ptr<sngxml::dom::Element> sngcpp::symbols::SymbolTable::ToDomElement()

Definition at line 37 of SymbolTable.cpp
Declaration at line 38 of SymbolTable.hpp

Calls: sngcpp::symbols::Symbol::ToDomElement , sngcpp::symbols::SymbolTable::CreateTypesElement

Called by: sngcpp::symbols::SymbolTable::ToDomDocument


top | up | prev | next