changeset 128:ed89fc3147ae

info: only analyse functions with virtual_functionality decorator
author Sigurd Meldgaard <stm@daimi.au.dk>
date Wed, 28 Oct 2009 12:48:54 +0100
parents 18fa1a19f18a
children e39c14597e02
files pysmcl/emacs/info.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/emacs/info.py	Wed Oct 28 12:48:09 2009 +0100
+++ b/pysmcl/emacs/info.py	Wed Oct 28 12:48:54 2009 +0100
@@ -14,7 +14,8 @@
         if isinstance(i, ast.FunctionDef):
             secret_analysis(i)
     for i in prog.body:
-        if isinstance(i, ast.FunctionDef):
+        if(isinstance(i, ast.FunctionDef) and
+           any([decorator.id == 'ideal_functionality' for decorator in i.decorator_list])):
             for j in ast.walk(i):
                 if isinstance(j, ast.stmt):
                     e = j.out_values["secret"]