AALanguage
The best language for those who have nothing to do
Loading...
Searching...
No Matches
TableIdentifiers Struct Reference

Identifier table used for semantic analysis. More...

#include <TableIdentifiers.h>

Collaboration diagram for TableIdentifiers:

Public Member Functions

 ~TableIdentifiers ()
 Class destructor.
 

Public Attributes

TableIdentifiersparent = nullptr
 Pointer to the parent scope identifier table.
 
std::vector< TableIdentifiers * > children
 Vector-array of pointers to scope child identifier tables.
 
std::unordered_map< std::string, Identifier * > identifiers
 Hash table of identifiers of the current scope. (key, value) = (name, pointer to Identifier)
 

Detailed Description

Identifier table used for semantic analysis.

Definition at line 114 of file TableIdentifiers.h.

Constructor & Destructor Documentation

◆ ~TableIdentifiers()

TableIdentifiers::~TableIdentifiers ( )
inline

Class destructor.

The destructor recursively calls the child ID table destructors, then deletes all variables and frees their memory.

Definition at line 126 of file TableIdentifiers.h.

References children, and identifiers.

Member Data Documentation

◆ children

std::vector<TableIdentifiers*> TableIdentifiers::children

Vector-array of pointers to scope child identifier tables.

Definition at line 118 of file TableIdentifiers.h.

Referenced by Poliz::add_tid_values(), Poliz::clear_tid_values(), and ~TableIdentifiers().

◆ identifiers

std::unordered_map<std::string, Identifier*> TableIdentifiers::identifiers

Hash table of identifiers of the current scope. (key, value) = (name, pointer to Identifier)

Definition at line 120 of file TableIdentifiers.h.

Referenced by Semantic::add_identifier(), Poliz::add_tid_values(), Poliz::clear_tid_values(), Semantic::create_function(), Semantic::get_identifier(), and ~TableIdentifiers().

◆ parent

TableIdentifiers* TableIdentifiers::parent = nullptr

Pointer to the parent scope identifier table.

Definition at line 116 of file TableIdentifiers.h.

Referenced by Semantic::del_table(), and Semantic::get_identifier().


The documentation for this struct was generated from the following file: