mirror of
https://github.com/ValKmjolnir/Nasal-Interpreter.git
synced 2026-07-21 18:38:44 +08:00
update
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
#ifndef __NASAL_RUNTIME_H__
|
||||
#define __NASAL_RUNTIME_H__
|
||||
|
||||
class nasal_runtime
|
||||
{
|
||||
private:
|
||||
nasal_ast root;
|
||||
std::stack<int> function_position;
|
||||
std::stack<int> running_stack;
|
||||
std::stack<int> closure_stack;
|
||||
public:
|
||||
nasal_runtime();
|
||||
~nasal_runtime();
|
||||
};
|
||||
|
||||
nasal_runtime::nasal_runtime()
|
||||
{
|
||||
root.clear();
|
||||
while(!function_position.empty())
|
||||
function_position.pop();
|
||||
while(!running_stack.empty())
|
||||
running_stack.pop();
|
||||
while(!closure_stack.empty())
|
||||
closure_stack.pop();
|
||||
return;
|
||||
}
|
||||
nasal_runtime::~nasal_runtime()
|
||||
{
|
||||
root.clear();
|
||||
while(!function_position.empty())
|
||||
function_position.pop();
|
||||
while(!running_stack.empty())
|
||||
running_stack.pop();
|
||||
while(!closure_stack.empty())
|
||||
closure_stack.pop();
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user