projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
068e22c
)
small cleanup in parser
author
Stefan Behnel
<scoder@users.berlios.de>
Sat, 20 Dec 2008 20:10:14 +0000
(21:10 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Sat, 20 Dec 2008 20:10:14 +0000
(21:10 +0100)
Cython/Compiler/Parsing.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Parsing.py
b/Cython/Compiler/Parsing.py
index 72e59cfa90b51b21091b343e61634a93b0ab3980..21b94883c78ec5a2f6ec965aa3350ceadff00135 100644
(file)
--- a/
Cython/Compiler/Parsing.py
+++ b/
Cython/Compiler/Parsing.py
@@
-84,12
+84,9
@@
def p_simple_expr(s):
if s.sy == 'if':
s.next()
test = p_or_test(s)
- if s.sy == 'else':
- s.next()
- other = p_test(s)
- return ExprNodes.CondExprNode(pos, test=test, true_val=expr, false_val=other)
- else:
- s.error("Expected 'else'")
+ s.expect('else')
+ other = p_test(s)
+ return ExprNodes.CondExprNode(pos, test=test, true_val=expr, false_val=other)
else:
return expr