Mercurial > lcfOS
comparison python/c3/parser.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 |
---|---|
125 self.sema.actOnFuncDef2(parameters, returntype, body) | 125 self.sema.actOnFuncDef2(parameters, returntype, body) |
126 | 126 |
127 # Statements: | 127 # Statements: |
128 def parseAssignment(self, lval): | 128 def parseAssignment(self, lval): |
129 lval = self.sema.actOnVariableUse(lval) | 129 lval = self.sema.actOnVariableUse(lval) |
130 self.Consume('=') | 130 loc = self.Consume('=').loc |
131 rval = self.parseExpression() | 131 rval = self.parseExpression() |
132 self.Consume(';') | 132 self.Consume(';') |
133 return astnodes.Assignment(lval, rval) | 133 return self.sema.actOnAssignment(lval, rval, loc) |
134 | 134 |
135 def parseProcedureCall(self, procedure): | 135 def parseProcedureCall(self, procedure): |
136 self.Consume('(') | 136 self.Consume('(') |
137 args = [] | 137 args = [] |
138 if not self.hasConsumed(')'): | 138 if not self.hasConsumed(')'): |