From bcc2906f62f7c0565cb0b2efe9b2c4d1275a122e Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sun, 4 Dec 2011 13:21:23 +0000 Subject: Replace outdated statements list by isTypeStatement --- pp2cc.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pp2cc.py') 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 -- cgit v1.2.1