Ignore:
Timestamp:
Apr 13, 2013, 10:58:50 AM (6 years ago)
Author:
cameron
Message:

Factor out AST helpers to mkast.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/carryInfo.py

    r3009 r3017  
    114114    self.block_visit(whileNode)
    115115
     116  def whileDepth(self, block_no):
     117    if block_no == 0: return 0
     118    elif self.whileblock[block_no]:
     119      return 1 + self.whileDepth(self.parent_block[block_no])
     120    else: return self.whileDepth(self.parent_block[block_no])
    116121
    117122
Note: See TracChangeset for help on using the changeset viewer.