Mercurial > lcfOS
comparison python/c3/astnodes.py @ 176:5fd02aa38b42
Added while loop code generation
author | Windel Bouwman |
---|---|
date | Sat, 20 Apr 2013 12:00:51 +0200 |
parents | 0b5b2ee6b435 |
children | 46d62dadd61b |
comparison
equal
deleted
inserted
replaced
175:a51b3c956386 | 176:5fd02aa38b42 |
---|---|
154 self.falsestatement = falsestatement | 154 self.falsestatement = falsestatement |
155 def __repr__(self): | 155 def __repr__(self): |
156 return 'IF-statement' | 156 return 'IF-statement' |
157 | 157 |
158 class WhileStatement(Node): | 158 class WhileStatement(Node): |
159 def __init__(self, condition, statements): | 159 def __init__(self, condition, statement): |
160 self.condition = condition | 160 self.condition = condition |
161 self.dostatements = statements | 161 self.dostatement = statement |
162 def __repr__(self): | 162 def __repr__(self): |
163 return 'WHILE-statement' | 163 return 'WHILE-statement' |
164 | 164 |