adobe / json-formula

Query language for JSON documents
http://opensource.adobe.com/json-formula/
Apache License 2.0
19 stars 8 forks source link

Fix operator precedence for concatenation #49

Closed JohnBrinkman closed 1 year ago

JohnBrinkman commented 1 year ago

Currently the concatenation operator (&) has the same precedence as multiple/divide, whereas in Openformula and Excel it is lower priority than addition/subtraction.

e.g. In json-formula this expression: 1 + 2 & 2 * 2 returns the number 45 whereas in Excel, =1 + 2 & 2 * 2 returns the string "34"

Expected Behaviour

We should change the priority to be the same as Openformula

vdua commented 1 year ago

Resolved