[jsinterp] Prevent mis-recognitions of local functions

pull/8/head
Philipp Hagemeister 2014-07-11 10:44:56 +02:00
rodzic c8bf86d50d
commit fc040bfd05
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -99,7 +99,7 @@ class JSInterpreter(object):
def extract_function(self, funcname):
func_m = re.search(
(r'(?:function %s|%s\s*=\s*function)' % (
(r'(?:function %s|[{;]%s\s*=\s*function)' % (
re.escape(funcname), re.escape(funcname))) +
r'\((?P<args>[a-z,]+)\){(?P<code>[^}]+)}',
self.code)