diff python/astviewer.py @ 164:e023d3ce1d63

Fix to loc of assignment
author Windel Bouwman
date Mon, 18 Mar 2013 22:15:57 +0100
parents 5a965e9664f2
children 598d3888a11c
line wrap: on
line diff
--- a/python/astviewer.py	Mon Mar 18 20:13:57 2013 +0100
+++ b/python/astviewer.py	Mon Mar 18 22:15:57 2013 +0100
@@ -1,5 +1,6 @@
 from PyQt4.QtCore import *
 from PyQt4.QtGui import *
+from c3 import Visitor
 
 def astToNamedElement(astNode, parentNode):
    """ Helper to convert and AST tree to NamedElement tree: """
@@ -20,9 +21,10 @@
    def setAst(self, ast):
       """ Create a new model and add all ast elements to it """
       model = QStandardItemModel()
+      print(ast)
       if ast:
          astToNamedElement(ast, model.invisibleRootItem())
-      self.setModel( model )
+      self.setModel(model)
       self.expandAll()
 
    def selectHandler(self, index):