Commit 62854398 authored by Stefan Behnel's avatar Stefan Behnel

disable some Cython syntax in .py compilation mode: typecasts, &..., sizeof()

--HG--
extra : rebase_source : 0160d58813fd19a43b5d6cc51fba2328d8ea72e0
parent be892b0e
...@@ -278,7 +278,8 @@ def _p_factor(s): ...@@ -278,7 +278,8 @@ def _p_factor(s):
pos = s.position() pos = s.position()
s.next() s.next()
return ExprNodes.unop_node(pos, op, p_factor(s)) return ExprNodes.unop_node(pos, op, p_factor(s))
elif sy == '&': elif not s.in_python_file:
if sy == '&':
pos = s.position() pos = s.position()
s.next() s.next()
arg = p_factor(s) arg = p_factor(s)
...@@ -287,7 +288,6 @@ def _p_factor(s): ...@@ -287,7 +288,6 @@ def _p_factor(s):
return p_typecast(s) return p_typecast(s)
elif sy == 'IDENT' and s.systring == "sizeof": elif sy == 'IDENT' and s.systring == "sizeof":
return p_sizeof(s) return p_sizeof(s)
else:
return p_power(s) return p_power(s)
def p_typecast(s): def p_typecast(s):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment