# HG changeset patch # User Windel Bouwman # Date 1373023611 -7200 # Node ID 57c032c5e753954bd49977bebeceb44d2a24d45e # Parent c1ccb1cb4cef0dd87c304e4c0dc85abb17129375 Fixed ast viewer diff -r c1ccb1cb4cef -r 57c032c5e753 python/arm_cm3.py --- a/python/arm_cm3.py Fri Jul 05 13:00:03 2013 +0200 +++ b/python/arm_cm3.py Fri Jul 05 13:26:51 2013 +0200 @@ -281,7 +281,6 @@ operands = (RegisterSet,) mnemonic = 'push' def __init__(self, regs): - print(self.operands) assert (type(regs),) == self.operands, (type(regs),) self.regs = regs def __repr__(self): diff -r c1ccb1cb4cef -r 57c032c5e753 python/astviewer.py --- a/python/astviewer.py Fri Jul 05 13:00:03 2013 +0200 +++ b/python/astviewer.py Fri Jul 05 13:26:51 2013 +0200 @@ -6,7 +6,6 @@ def __init__(self): self.functionIco = QIcon(QPixmap('icons/functionicon.png').scaled(32, 32)) self.variableIco = QIcon(QPixmap('icons/variableicon.png').scaled(32, 32)) - self.visitor = Visitor(self.p1, self.p2) self.model = QStandardItemModel() self.model.setHorizontalHeaderLabels(['Object', 'Type']) def build(self, pkg): @@ -14,7 +13,8 @@ c = self.model.rowCount() self.model.removeRows(0, c) self.curItem = self.model.invisibleRootItem() - self.visitor.visit(pkg) + visitor = Visitor() + visitor.visit(pkg, self.p1, self.p2) def p1(self, node): if type(node) is astnodes.Variable: i = QStandardItem(self.variableIco, str(node))