[pypy-svn] r37970 - pypy/dist/pypy/lang/js
santagada at codespeak.net
santagada at codespeak.net
Mon Feb 5 15:51:58 CET 2007
Author: santagada
Date: Mon Feb 5 15:51:51 2007
New Revision: 37970
Modified:
pypy/dist/pypy/lang/js/interpreter.py
pypy/dist/pypy/lang/js/jsobj.py
pypy/dist/pypy/lang/js/jsparser.py
Log:
removed some problems with using re's when they were not needed
Modified: pypy/dist/pypy/lang/js/interpreter.py
==============================================================================
--- pypy/dist/pypy/lang/js/interpreter.py (original)
+++ pypy/dist/pypy/lang/js/interpreter.py Mon Feb 5 15:51:51 2007
@@ -671,6 +671,8 @@
ctx.variable.Put(var.name, w_Undefined)
for fun in self.func_decl:
ctx.variable.Put(fun.name, fun.eval(ctx))
+
+ node = self
try:
last = w_Undefined
Modified: pypy/dist/pypy/lang/js/jsobj.py
==============================================================================
--- pypy/dist/pypy/lang/js/jsobj.py (original)
+++ pypy/dist/pypy/lang/js/jsobj.py Mon Feb 5 15:51:51 2007
@@ -129,7 +129,7 @@
if callfunc is not None:
self.Scope = ctx.scope[:]
else:
- self.Scope = []
+ self.Scope = None
self.Value = Value
def Call(self, ctx, args=[], this=None):
Modified: pypy/dist/pypy/lang/js/jsparser.py
==============================================================================
--- pypy/dist/pypy/lang/js/jsparser.py (original)
+++ pypy/dist/pypy/lang/js/jsparser.py Mon Feb 5 15:51:51 2007
@@ -39,8 +39,7 @@
def unquote(t):
if isinstance(t, Symbol):
if t.symbol == "QUOTED_STRING":
- t.additional_info = t.additional_info.strip("'")
- t.additional_info = re.sub(r"\\'", r"'", t.additional_info)
+ t.additional_info = t.additional_info.strip("'").replace("\\'", "'")
else:
for i in t.children:
unquote(i)
More information about the Pypy-commit
mailing list