Mercurial > lcfOS
diff python/ppci/c3/astnodes.py @ 307:e609d5296ee9
Massive rewrite of codegenerator
author | Windel Bouwman |
---|---|
date | Thu, 12 Dec 2013 20:42:56 +0100 |
parents | b145f8e6050b |
children | 2e7f55319858 |
line wrap: on
line diff
--- a/python/ppci/c3/astnodes.py Mon Dec 09 19:00:21 2013 +0100 +++ b/python/ppci/c3/astnodes.py Thu Dec 12 20:42:56 2013 +0100 @@ -284,7 +284,7 @@ self.loc = loc -class EmptyStatement(Statement): +class Empty(Statement): """ Empty statement which does nothing! """ def __init__(self): super().__init__(None) @@ -293,7 +293,7 @@ return 'NOP' -class CompoundStatement(Statement): +class Compound(Statement): """ Statement consisting of a sequence of other statements """ def __init__(self, statements): super().__init__(None) @@ -305,7 +305,7 @@ return 'COMPOUND STATEMENT' -class ReturnStatement(Statement): +class Return(Statement): def __init__(self, expr, loc): super().__init__(loc) self.expr = expr @@ -335,7 +335,7 @@ return 'Epression' -class IfStatement(Statement): +class If(Statement): def __init__(self, condition, truestatement, falsestatement, loc): super().__init__(loc) self.condition = condition @@ -346,7 +346,7 @@ return 'IF-statement' -class WhileStatement(Statement): +class While(Statement): def __init__(self, condition, statement, loc): super().__init__(loc) self.condition = condition