We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51dda4b commit e8cc68cCopy full SHA for e8cc68c
scc/cheader.py
@@ -59,8 +59,8 @@ def eval_expr(expr):
59
""" Eval and expression inside a #define using a suppart of python grammar """
60
61
def _eval(node):
62
- if isinstance(node, ast.Num):
63
- return node.n
+ if isinstance(node, ast.Constant):
+ return node.value
64
elif isinstance(node, ast.BinOp):
65
return OPERATORS[type(node.op)](_eval(node.left), _eval(node.right))
66
elif isinstance(node, ast.UnaryOp):
0 commit comments