mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-23 11:32:25 +08:00
Move more stuff and fix tests.
This commit is contained in:
@@ -76,12 +76,12 @@ class Normalizer(use_metaclass(_NormalizerMeta)):
|
||||
@classmethod
|
||||
def register_rule(cls, **kwargs):
|
||||
"""
|
||||
Use it as a class decorator:
|
||||
Use it as a class decorator::
|
||||
|
||||
>>> normalizer = Normalizer('grammar', 'config')
|
||||
>>> @normalizer.register_rule(value='foo')
|
||||
... class MyRule(Rule):
|
||||
... error_code = 42
|
||||
normalizer = Normalizer('grammar', 'config')
|
||||
@normalizer.register_rule(value='foo')
|
||||
class MyRule(Rule):
|
||||
error_code = 42
|
||||
"""
|
||||
return cls._register_rule(**kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user