Permalink
Browse files
[osh2oil] Don't crash on translation of EmptyPart.
- Loading branch information...
Showing
with
6 additions
and
0 deletions.
-
+3
−0
core/word.py
-
+3
−0
tools/osh2oil.py
|
|
@@ -157,6 +157,9 @@ def LeftMostSpanForPart(part): |
|
|
elif part.tag == word_part_e.BracedAltPart:
|
|
|
return const.NO_INTEGER
|
|
|
|
|
|
elif part.tag == word_part_e.EmptyPart:
|
|
|
return const.NO_INTEGER
|
|
|
|
|
|
else:
|
|
|
raise AssertionError(part.__class__.__name__)
|
|
|
|
|
|
|
|
|
@@ -1176,6 +1176,9 @@ def DoWordPart(self, node, local_symbols, quoted=False): |
|
|
self.f.write(')')
|
|
|
self.cursor.SkipUntil(right_spid + 1)
|
|
|
|
|
|
elif node.tag == word_part_e.EmptyPart:
|
|
|
pass
|
|
|
|
|
|
else:
|
|
|
raise AssertionError(node.__class__.__name__)
|
|
|
|
|
|
|
0 comments on commit
d9790db