Mercurial > lcfOS
comparison python/c3/semantics.py @ 175:a51b3c956386
Added function call in expressions
author | Windel Bouwman |
---|---|
date | Fri, 19 Apr 2013 22:15:54 +0200 |
parents | ee0d30533dae |
children | b01429a5d695 |
comparison
equal
deleted
inserted
replaced
174:3eb06f5fb987 | 175:a51b3c956386 |
---|---|
32 self.curFunc.loc = loc | 32 self.curFunc.loc = loc |
33 self.addSymbol(self.curFunc) | 33 self.addSymbol(self.curFunc) |
34 self.curScope = self.curFunc.scope = Scope(self.curScope) | 34 self.curScope = self.curFunc.scope = Scope(self.curScope) |
35 def actOnParameter(self, name, loc, t): | 35 def actOnParameter(self, name, loc, t): |
36 p = astnodes.Variable(name, t) | 36 p = astnodes.Variable(name, t) |
37 p.isParameter = True | |
37 p.loc = loc | 38 p.loc = loc |
38 p.parameter = True | |
39 self.addSymbol(p) | 39 self.addSymbol(p) |
40 return p | 40 return p |
41 def actOnFuncDef2(self, parameters, returntype, body): | 41 def actOnFuncDef2(self, parameters, returntype, body): |
42 self.curFunc.body = body | 42 self.curFunc.body = body |
43 paramtypes = [p.typ for p in parameters] | 43 paramtypes = [p.typ for p in parameters] |