summaryrefslogtreecommitdiff
path: root/runtime.cpp
diff options
context:
space:
mode:
authortomsmeding <hallo@tomsmeding.nl>2015-09-06 22:18:30 +0200
committertomsmeding <hallo@tomsmeding.nl>2015-09-06 22:18:30 +0200
commitb50d606bdd0fbda3451e9fcb07e8096fa5bee55b (patch)
treeb323b11157acdd52c6a7ba61b3036e82b0a57381 /runtime.cpp
parent61dc84ab5ae95b3fa6bbbdcadf880f8ec64a925f (diff)
Add scopes!
Diffstat (limited to 'runtime.cpp')
-rw-r--r--runtime.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime.cpp b/runtime.cpp
index 63e0b52..3cf607d 100644
--- a/runtime.cpp
+++ b/runtime.cpp
@@ -129,7 +129,9 @@ void runpasseval(const vector<string> &T,
} else {
auto it=functions.find(word);
if(it!=functions.end()){
+ builtins.find("enterscope")->second(S,variables);
runpasseval(it->second.first,S,functions,variables,it->second.second);
+ builtins.find("leavescope")->second(S,variables);
} else {
if(word=="while"){
if(S.size()<1)throw string("Keyword 'while' needs 1 stack item");