Start adding normalizers instead of the get_code(normalize=True) function.

This commit is contained in:
Dave Halter
2017-05-27 13:02:56 -04:00
parent 7c1f3b3a65
commit 673ffb9c62
4 changed files with 70 additions and 23 deletions

13
parso/normalizer.py Normal file
View 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