Mercurial > lcfOS
changeset 216:57c032c5e753
Fixed ast viewer
author | Windel Bouwman |
---|---|
date | Fri, 05 Jul 2013 13:26:51 +0200 |
parents | c1ccb1cb4cef |
children | 8b2e5f3cd579 |
files | python/arm_cm3.py python/astviewer.py |
diffstat | 2 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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):
--- 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))