diff python/ppci/ir2tree.py @ 323:e9fe6988497c

Used burg for generating expressions
author Windel Bouwman
date Thu, 30 Jan 2014 19:03:24 +0100
parents 44f336460c2a
children 5477e499b039
line wrap: on
line diff
--- a/python/ppci/ir2tree.py	Mon Jan 27 19:58:07 2014 +0100
+++ b/python/ppci/ir2tree.py	Thu Jan 30 19:03:24 2014 +0100
@@ -1,6 +1,8 @@
 from tree import Tree
 from . import ir
 
+""" Create a tree from ir code. """
+
 f_map = {}    # Mapping from types to tree creation functions
 
 def register(tp):
@@ -35,7 +37,9 @@
 
 @register(ir.Call)
 def call_to_tree(e):
-    return Tree('CALL')
+    t = Tree('CALL')
+    t.value = e
+    return t
 
 def makeTree(ir_node):
     """ Transform an ir node into a tree usable for matching """