headers added

This commit is contained in:
avinal
2020-08-08 11:55:34 +05:30
parent 93994df022
commit 8d7a6832f4
3 changed files with 67 additions and 0 deletions

21
include/symbol_table.hpp Normal file
View File

@@ -0,0 +1,21 @@
#pragma once
#ifdef SYMBOL_TABLE_HPP
#define SYMBOL_TABLE_HPP
#include <unordered_map>
class symbol_table
{
private:
std::unordered_map<std::string, int> symbols;
public:
symbol_table();
~symbol_table();
void add_entry(std::string symbol, int address);
bool contains(std::string symbol);
int get_address(std::string symbol);
};
#endif