Permalink
Browse files

Print names of unconverted node types, rather than numbers.

  • Loading branch information...
Andy Chu
Andy Chu committed Jul 31, 2017
1 parent 8e371a8 commit 9d7af3581594e235d0a449a538cc51f8d15f6fe9
Showing with 9 additions and 9 deletions.
  1. +9 −9 tools/osh2oil.py
View
@@ -267,10 +267,10 @@ def DoRedirect(self, node, local_symbols):
# TODO:
# If do_expansion, then """, else '''
# HereDoc LST node needs spids for both opening and closing delimiter.
raise NotImplementedError(str(node))
raise NotImplementedError(node.__class__.__name__)
else:
raise AssertionError(node.tag)
raise AssertionError(node.__class__.__name__)
# <<< 'here word'
# << 'here word'
@@ -810,8 +810,8 @@ def DoCommand(self, node, local_symbols, at_top_level=False):
self.DoCommand(node.pipeline, local_symbols)
else:
log('Command not handled: %s', node)
raise AssertionError(str(node.tag))
#log('Command not handled: %s', node)
raise AssertionError(node.__class__.__name__)
def DoWordAsExpr(self, node, local_symbols):
style = _GetRhsStyle(node)
@@ -993,7 +993,7 @@ def DoWordInCommand(self, node, local_symbols):
#pass
else:
raise AssertionError(node.tag)
raise AssertionError(node.__class__.__name__)
def DoWordPart(self, node, local_symbols, quoted=False):
span_id = word._LeftMostSpanForPart(node)
@@ -1173,8 +1173,8 @@ def DoWordPart(self, node, local_symbols, quoted=False):
self.cursor.SkipUntil(right_spid + 1)
else:
log('WordPart not handled: %s', node)
raise AssertionError(node.tag)
#log('WordPart not handled: %s', node)
raise AssertionError(node.__class__.__name__)
def DoArithExpr(self, node, local_symbols):
if node.tag == arith_expr_e.ArithBinary:
@@ -1192,8 +1192,8 @@ def DoArithExpr(self, node, local_symbols):
self.DoWordInCommand(node.w, local_symbols)
else:
log("Unhandled: %s", node)
raise AssertionError(node.tag)
#log("Unhandled: %s", node)
raise AssertionError(node.__class__.__name__)
def DoBoolExpr(self, node):
# TODO: switch on node.tag

0 comments on commit 9d7af35

Please sign in to comment.