summaryrefslogtreecommitdiff
path: root/pp2cc.py
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2011-12-04 13:21:23 +0000
committerPeter Wu <lekensteyn@gmail.com>2011-12-04 13:21:23 +0000
commitbcc2906f62f7c0565cb0b2efe9b2c4d1275a122e (patch)
tree08d94dfe81b22e5d1cd750e0e5edeea7f6ea88f4 /pp2cc.py
parentb0fdcbbf06175cd503e5b0ecefa49759f9872dbd (diff)
downloadpp2cc-bcc2906f62f7c0565cb0b2efe9b2c4d1275a122e.tar.gz
Replace outdated statements list by isTypeStatement
Diffstat (limited to 'pp2cc.py')
-rwxr-xr-xpp2cc.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/pp2cc.py b/pp2cc.py
index 99585c4..d1b0bdb 100755
--- a/pp2cc.py
+++ b/pp2cc.py
@@ -1260,9 +1260,7 @@ class Parse(object):
if linked_node.type in ("ID", "Constant", "UnaryOp", "FuncCall", "Cast",
"BinaryOp", "TernaryOp", "Assignment", "ExprList", "ArrayRef"):
lines += getattr(self, "parse" + linked_node.type)(linked_node)
- elif linked_node.type in ("Compound", "If", "Return", "DoWhile",
- "While", "For", "Decl", "FuncDef", "Break", "Continue",
- "EmptyStatement"):
+ elif linked_node.isTypeStatement():
self.logger.error("A statement is used in expression context",
linked_node=linked_node)
elif linked_node.type in ("CompoundLiteral",# won't be supported