Fixing naked chained existential checks -- the associativity recently got reversed.

This commit is contained in:
Jeremy Ashkenas
2010-08-14 16:33:20 -04:00
parent c90a75ebc5
commit 129e950c59
6 changed files with 30 additions and 23 deletions

View File

@@ -529,6 +529,7 @@ grammar =
o "Expression --", -> new OpNode '--', $1, null, true
o "Expression ++", -> new OpNode '++', $1, null, true
o "Expression ? Expression", -> new OpNode '?', $1, $3
o "Expression + Expression", -> new OpNode '+', $1, $3
o "Expression - Expression", -> new OpNode '-', $1, $3
o "Expression == Expression", -> new OpNode '==', $1, $3
@@ -561,7 +562,7 @@ grammar =
#
# (2 + 3) * 4
operators = [
["left", '?']
["right", '?']
["nonassoc", '++', '--']
["right", 'UNARY']
["left", 'MATH']