nsbaci 1.0
Loading...
Searching...
No Matches
compilerTypes.h
Go to the documentation of this file.
1
12
13#ifndef NSBACI_TYPES_COMPILERTYPES_H
14#define NSBACI_TYPES_COMPILERTYPES_H
15
16#include <cstdint>
17#include <string>
18#include <unordered_map>
19#include <vector>
20
25namespace nsbaci::types {
26
28using VarName = std::string;
29
31using MemoryAddr = uint32_t;
32
34struct SymbolInfo {
35 VarName name;
36 MemoryAddr address;
37 std::string type;
38 bool isGlobal;
39};
40
42using SymbolTable = std::unordered_map<VarName, SymbolInfo>;
43
44} // namespace nsbaci::types
45
46#endif // NSBACI_TYPES_COMPILERTYPES_H
Type definitions namespace for nsbaci (runtime-specific).
uint32_t MemoryAddr
Type alias for memory addresses.
Definition compilerTypes.h:31
std::string VarName
Type alias for variable names.
Definition compilerTypes.h:28
std::unordered_map< VarName, SymbolInfo > SymbolTable
Lookup table mapping variable names to their symbol info.
Definition compilerTypes.h:42
Information about a variable/symbol.
Definition compilerTypes.h:34
std::string type
"int", "bool", "char", "void", etc.
Definition compilerTypes.h:37