summaryrefslogtreecommitdiffstats
path: root/src/front/scope.py
diff options
context:
space:
mode:
authorAndreas Nüßlein <nutz@unfoog.de>2009-07-02 21:12:49 +0200
committerBenedikt Böhm <bb@xnull.de>2009-07-02 21:12:49 +0200
commit87b6f874776b253f77f4a1bf4c1844d99a8e544f (patch)
tree533f15f399da8969f044885851fc97027533d07a /src/front/scope.py
parent8c9fb246794f7cb94689c348f104b29433416f4e (diff)
downloadswppy-87b6f874776b253f77f4a1bf4c1844d99a8e544f.tar.gz
swppy-87b6f874776b253f77f4a1bf4c1844d99a8e544f.tar.xz
swppy-87b6f874776b253f77f4a1bf4c1844d99a8e544f.zip
implement three-address-code objects instead of printf
Diffstat (limited to '')
-rw-r--r--src/front/scope.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/front/scope.py b/src/front/scope.py
index a15ed1d..533497d 100644
--- a/src/front/scope.py
+++ b/src/front/scope.py
@@ -20,5 +20,8 @@ class Scope(object):
if symbol not in self.__functions[self.__current_function]:
self.__functions[self.__current_function].append(symbol)
+ def contains(self, name):
+ return name in self.__functions[self.__current_function]
+
def __str__(self):
return "<Scope: %s>" % str(self.__functions)