Mercurial > lcfOS
view python/ir/value.py @ 148:e5263f74b287
Added c3 language frontend initial parser
author | Windel Bouwman |
---|---|
date | Fri, 01 Mar 2013 10:24:01 +0100 |
parents | 4e79484a9d47 |
children | b28a11c01dbe |
line wrap: on
line source
class Value: def __init__(self, vty=None): self.valueType = vty self.name = None def getContext(self): return self.valueType.context def dump(self): print(self) def getName(self): return self.name def setName(self, name): if not self.name and not name: return self.name = name if self.st: pass else: pass Name = property(getName, setName) class Constant(Value): def __init__(self, value, vty): super().__init__(vty) self.value = value print('new constant value: ', value)