Mercurial > lcfOS
comparison python/c3/visitor.py @ 222:c3f1ce8b638f
Fixup of parser
author | Windel Bouwman |
---|---|
date | Tue, 09 Jul 2013 17:36:31 +0200 |
parents | 3f6c30a5d234 |
children | 1c7364bd74c7 |
comparison
equal
deleted
inserted
replaced
221:848c4b15fd0b | 222:c3f1ce8b638f |
---|---|
41 elif type(node) is Binop: | 41 elif type(node) is Binop: |
42 self.do(node.a) | 42 self.do(node.a) |
43 self.do(node.b) | 43 self.do(node.b) |
44 elif type(node) is Unop: | 44 elif type(node) is Unop: |
45 self.do(node.a) | 45 self.do(node.a) |
46 elif type(node) is ExpressionStatement: | |
47 self.do(node.ex) | |
48 elif type(node) is TypeCast: | |
49 self.do(node.a) | |
46 elif type(node) is Constant: | 50 elif type(node) is Constant: |
47 self.do(node.value) | 51 self.do(node.value) |
48 elif type(node) in [EmptyStatement, VariableUse, Variable, Literal, FunctionType]: | 52 elif type(node) in [EmptyStatement, VariableUse, Variable, Literal, FunctionType]: |
49 # Those nodes do not have child nodes. | 53 # Those nodes do not have child nodes. |
50 pass | 54 pass |