Mercurial > lcfOS
comparison python/c3/semantics.py @ 164:e023d3ce1d63
Fix to loc of assignment
author | Windel Bouwman |
---|---|
date | Mon, 18 Mar 2013 22:15:57 +0100 |
parents | 8104fc8b5e90 |
children | 598d3888a11c |
comparison
equal
deleted
inserted
replaced
163:8104fc8b5e90 | 164:e023d3ce1d63 |
---|---|
54 def actOnNumber(self, num, loc): | 54 def actOnNumber(self, num, loc): |
55 n = astnodes.Literal(num) | 55 n = astnodes.Literal(num) |
56 n.loc = loc | 56 n.loc = loc |
57 return n | 57 return n |
58 def actOnVariableUse(self, d): | 58 def actOnVariableUse(self, d): |
59 return astnodes.VariableUse(d) | 59 vu = astnodes.VariableUse(d) |
60 return vu | |
61 def actOnAssignment(self, lval, rval, loc): | |
62 a = astnodes.Assignment(lval, rval) | |
63 a.loc = loc | |
64 return a | |
60 | 65 |