def blockin(self, block):
ret = []
if block not in self.allblocks:
Error("Invalid block '%s'"%block)
# First, let's close other possible open blocks
while self.block() and block not in self.contains[self.block()]:
ret.extend(self.blockout())
# Now we can gladly add this new one
self.BLK.append(block)
self.HLD.append([])
self.PRP.append({})
self.count += 1
if block == 'table': self.tableparser = TableMaster()
# Deeper and deeper
self.depth = len(self.BLK)
Debug('block ++ (%s): %s' % (block,self.BLK), 3)
return ret
评论列表
文章目录