Working on making sure functions return a value

This commit is contained in:
2021-05-05 16:11:49 +02:00
parent 287bf565bd
commit 835cae35bb
3 changed files with 11 additions and 8 deletions

View File

@@ -10,7 +10,7 @@ struct t_parameter {
struct t_function {
std::string name;
uint32_t address;
uint32_t type;
int type;
std::vector<t_parameter> parameters;
};
@@ -19,7 +19,7 @@ static int current_function = -1;
const bool function_register(const std::string name, const uint32_t address) {
for (auto f : functions) if (f.name == name) return false;
functions.push_back({name, address});
functions.push_back({name, address, -1});
current_function = functions.size()-1;
return true;
}