Permalink
Browse files

[osh2oil] Don't crash on translation of EmptyPart.

  • Loading branch information...
Andy Chu
Andy Chu committed Aug 25, 2018
1 parent 25ef33c commit d9790db49b8763c618695d6732bdb6789b75a57c
Showing with 6 additions and 0 deletions.
  1. +3 −0 core/word.py
  2. +3 −0 tools/osh2oil.py
View
@@ -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__)
View
@@ -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

Please sign in to comment.