Commit f5b8196d by Haichen Shen

basic var

parent a7a6cd52
...@@ -7,7 +7,13 @@ class Var(Expr): ...@@ -7,7 +7,13 @@ class Var(Expr):
self.name = name self.name = name
self.expr = expr self.expr = expr
def assign(self, expr):
self.expr = expr
def children(self): def children(self):
if self.expr is None: if self.expr is None:
return () return ()
return self.expr.children() return self.expr.children()
def same_as(self, other):
return (self.name == other.name)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment