Working on making sure functions return a value
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user