Changeset 850


Ignore:
Timestamp:
Dec 23, 2010, 8:09:13 AM (8 years ago)
Author:
cameron
Message:

Preserve else part statements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/pablo.py

    r822 r850  
    266266    carry_arglist = [self.carryvar, ast.Num(carry_base), ast.Num(carries)]
    267267    new_test = ast.BoolOp(ast.Or(), [ifNode.test, mkCall('CarryTest', carry_arglist)])
    268     new_else_part = [mkCallStmt('CarryDequeueEnqueue', carry_arglist)]
     268    new_else_part = ifNode.orelse + [mkCallStmt('CarryDequeueEnqueue', carry_arglist)]
    269269    return ast.If(new_test, ifNode.body, new_else_part)
    270270  def visit_While(self, whileNode):
Note: See TracChangeset for help on using the changeset viewer.