mirror of
https://github.com/open-goal/jak-project
synced 2026-09-07 19:40:48 -04:00
add stacking framework
This commit is contained in:
@@ -20,6 +20,18 @@ FormPool::~FormPool() {
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////
|
||||
// FormElement
|
||||
///////////////////
|
||||
|
||||
std::string FormElement::to_string(const Env& env) const {
|
||||
return to_form(env).print();
|
||||
}
|
||||
|
||||
void FormElement::push_to_stack(const Env& env, FormStack&) {
|
||||
throw std::runtime_error("push_to_stack not implemented for " + to_string(env));
|
||||
}
|
||||
|
||||
///////////////////
|
||||
// Form
|
||||
//////////////////
|
||||
@@ -38,6 +50,10 @@ goos::Object Form::to_form(const Env& env) const {
|
||||
}
|
||||
}
|
||||
|
||||
std::string Form::to_string(const Env& env) const {
|
||||
return to_form(env).print();
|
||||
}
|
||||
|
||||
void Form::inline_forms(std::vector<goos::Object>& forms, const Env& env) const {
|
||||
for (auto& x : m_elements) {
|
||||
forms.push_back(x->to_form(env));
|
||||
|
||||
Reference in New Issue
Block a user