Mercurial > lcfOS
comparison python/c3/astnodes.py @ 155:b28a11c01dbe
Simplified IR classes
author | Windel Bouwman |
---|---|
date | Sun, 03 Mar 2013 13:20:03 +0100 |
parents | 4ae0e02599de |
children | 9683a4cd848f |
comparison
equal
deleted
inserted
replaced
154:81e08e2e7777 | 155:b28a11c01dbe |
---|---|
142 def __init__(self, statements): | 142 def __init__(self, statements): |
143 self.statements = statements | 143 self.statements = statements |
144 def __repr__(self): | 144 def __repr__(self): |
145 return 'COMPOUND STATEMENT' | 145 return 'COMPOUND STATEMENT' |
146 | 146 |
147 class EmptyStatement(Node): | |
148 pass | |
149 | |
147 class ReturnStatement(Node): | 150 class ReturnStatement(Node): |
148 def __init__(self, expr): | 151 def __init__(self, expr): |
149 self.expr = expr | 152 self.expr = expr |
150 def __repr__(self): | 153 def __repr__(self): |
151 return 'RETURN STATEMENT' | 154 return 'RETURN STATEMENT' |