From cb101344f6f9a9824a56ce7d52caba8fed3a6578 Mon Sep 17 00:00:00 2001 From: Ru Uba Date: Sat, 11 Jun 2022 04:33:58 -0400 Subject: [PATCH] Example in exmapl folder doesnt work. no 'generic_transform" function literal copy of transform_Object function into generic _transform function. --- esprima/visitor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/esprima/visitor.py b/esprima/visitor.py index ad32375..743c186 100644 --- a/esprima/visitor.py +++ b/esprima/visitor.py @@ -74,6 +74,9 @@ def transform(self, obj, metadata): def transform_Object(self, obj, metadata): """Called if no explicit transform function exists for an Object.""" return obj + + def generic_transform(self, obj, metadata): + return obj def generic_visit(self, obj): return self.visit(self.visit_Object(obj))