Structs (IN BETA)

This commit is contained in:
2025-10-04 20:37:55 +10:00
parent b3950dcd62
commit 0057d73215
13 changed files with 322 additions and 10 deletions

View File

@@ -10,6 +10,13 @@ Value evaluate(Value val) {
}
} else if (val.valtype == ValueType::Variable) {
return data::getValue(val.varName.key);
} else if (val.valtype == ValueType::Identifier) {
// Check if it's a variable that doesn't start with $
for (auto it = data::scopes.rbegin(); it != data::scopes.rend(); ++it) {
if (it->count(val.string_val)) {
return (*it)[val.string_val];
}
}
}
return val;
}