mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-23 19:42:07 +08:00
Start adding normalizers instead of the get_code(normalize=True) function.
This commit is contained in:
13
parso/normalizer.py
Normal file
13
parso/normalizer.py
Normal file
@@ -0,0 +1,13 @@
|
||||
class Normalizer():
|
||||
def normalize(self, leaf):
|
||||
return leaf.prefix + leaf.value
|
||||
|
||||
def iter_errors(self, leaf):
|
||||
return iter([])
|
||||
|
||||
|
||||
class Error():
|
||||
def __init__(self, leaf, code, message):
|
||||
self._leaf = leaf
|
||||
self.code = code
|
||||
self.message = message
|
||||
Reference in New Issue
Block a user