From 87b6f874776b253f77f4a1bf4c1844d99a8e544f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20N=C3=BC=C3=9Flein?= Date: Thu, 2 Jul 2009 21:12:49 +0200 Subject: implement three-address-code objects instead of printf --- src/front/scope.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/front/scope.py') 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 "" % str(self.__functions) -- cgit v1.2.3