Mercurial > lcfOS
comparison python/ppci/c3/astnodes.py @ 308:2e7f55319858
Merged analyse into codegenerator
author | Windel Bouwman |
---|---|
date | Fri, 13 Dec 2013 11:53:29 +0100 |
parents | e609d5296ee9 |
children | 084cccaa5deb |
comparison
equal
deleted
inserted
replaced
307:e609d5296ee9 | 308:2e7f55319858 |
---|---|
13 pass | 13 pass |
14 | 14 |
15 | 15 |
16 # Variables, parameters, local variables, constants and named types: | 16 # Variables, parameters, local variables, constants and named types: |
17 class Symbol(Node): | 17 class Symbol(Node): |
18 """ Symbol is the base class for all named things like variables, | 18 """ Symbol is the base class for all named things like variables, |
19 functions, constants and types and modules """ | 19 functions, constants and types and modules """ |
20 def __init__(self, name): | 20 def __init__(self, name): |
21 self.name = name | 21 self.name = name |
22 self.refs = [] | 22 self.refs = [] |
23 | 23 |
45 """ Base class of all types """ | 45 """ Base class of all types """ |
46 pass | 46 pass |
47 | 47 |
48 | 48 |
49 class NamedType(Type, Symbol): | 49 class NamedType(Type, Symbol): |
50 """ Some types are named, for example a user defined type (typedef) | 50 """ Some types are named, for example a user defined type (typedef) |
51 and built in types. That is why this class derives from both Type | 51 and built in types. That is why this class derives from both Type |
52 and Symbol. """ | 52 and Symbol. """ |
53 def __init__(self, name): | 53 def __init__(self, name): |
54 Symbol.__init__(self, name) | 54 Symbol.__init__(self, name) |
55 | 55 |