Browse Source

Fixed commit 216c341 (Issue #246, #249)

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.66
Erez Shinan 6 years ago
parent
commit
3c1c867b5f
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      lark/visitors.py

+ 2
- 3
lark/visitors.py View File

@@ -69,9 +69,8 @@ class Transformer:
if name.startswith('_') or name in libmembers: if name.startswith('_') or name in libmembers:
continue continue


if isinstance(cls.__dict__[name], (staticmethod, classmethod)):
kwargs['static'] = True
setattr(cls, name, decorator(value, **kwargs))
static = isinstance(cls.__dict__[name], (staticmethod, classmethod))
setattr(cls, name, decorator(value, static=static, **kwargs))
return cls return cls






Loading…
Cancel
Save