Starting to refactor the normalizer to make sure that comments are also checked for indentation.

Using a linked list now for the indentation stack.
This commit is contained in:
Dave Halter
2017-07-02 18:58:43 +02:00
parent 7a7ad2038d
commit 36a59a3d3b
4 changed files with 120 additions and 122 deletions

View File

@@ -68,7 +68,6 @@ def split_prefix(leaf, start_pos):
if not value:
break
type_ = _types[value[0]]
print(repr(spacing), repr(value), column)
yield PrefixPart(
leaf, type_, value, spacing,
start_pos=(line, column + start + len(spacing))
@@ -79,7 +78,6 @@ def split_prefix(leaf, start_pos):
line += 1
column = -start
print('x', repr(value), repr(spacing))
if value:
spacing = ''
yield PrefixPart(