summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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