2016-11-12 | Paul Boddie | raw files shortlog changelog graph | Support the raise statement without arguments. | |
translator.py (file) |
1.1 --- a/translator.py Sat Nov 12 01:36:04 2016 +0100 1.2 +++ b/translator.py Sat Nov 12 23:27:04 2016 +0100 1.3 @@ -1097,7 +1097,10 @@ 1.4 1.5 # NOTE: Determine which raise statement variants should be permitted. 1.6 1.7 - self.writestmt("__Raise(%s);" % self.process_structure_node(n.expr1)) 1.8 + if n.expr1: 1.9 + self.writestmt("__Raise(%s);" % self.process_structure_node(n.expr1)) 1.10 + else: 1.11 + self.writestmt("__Complete;") 1.12 1.13 def process_return_node(self, n): 1.14