Mercurial > lcfOS
comparison python/c3/visitor.py @ 225:1c7364bd74c7
Fixed pointer deref
author | Windel Bouwman |
---|---|
date | Thu, 11 Jul 2013 07:42:30 +0200 |
parents | c3f1ce8b638f |
children | 7f18ed9b6b7e |
comparison
equal
deleted
inserted
replaced
224:5af52987f5bd | 225:1c7364bd74c7 |
---|---|
45 self.do(node.a) | 45 self.do(node.a) |
46 elif type(node) is ExpressionStatement: | 46 elif type(node) is ExpressionStatement: |
47 self.do(node.ex) | 47 self.do(node.ex) |
48 elif type(node) is TypeCast: | 48 elif type(node) is TypeCast: |
49 self.do(node.a) | 49 self.do(node.a) |
50 elif type(node) is FieldRef: | |
51 self.do(node.base) | |
52 elif type(node) is Deref: | |
53 self.do(node.ptr) | |
50 elif type(node) is Constant: | 54 elif type(node) is Constant: |
51 self.do(node.value) | 55 self.do(node.value) |
52 elif type(node) in [EmptyStatement, VariableUse, Variable, Literal, FunctionType]: | 56 elif type(node) in [EmptyStatement, VariableUse, Variable, Literal, FunctionType, DefinedType]: |
53 # Those nodes do not have child nodes. | 57 # Those nodes do not have child nodes. |
54 pass | 58 pass |
55 elif type(node) is WhileStatement: | 59 elif type(node) is WhileStatement: |
56 self.do(node.condition) | 60 self.do(node.condition) |
57 self.do(node.statement) | 61 self.do(node.statement) |