From 07590ea8505f6bde5aac2e8d73cfa24c3887aeb4 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Fri, 27 Feb 2015 19:12:22 +0100 Subject: [PATCH] Fix bug where (a * 5) + 4 was converted to a + 5 + 4. --- lslopt/lslfoldconst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lslopt/lslfoldconst.py b/lslopt/lslfoldconst.py index 012f002..e15a8fc 100644 --- a/lslopt/lslfoldconst.py +++ b/lslopt/lslfoldconst.py @@ -278,7 +278,7 @@ class foldconst(object): # (op b) + c -> op b + c # where op's priority is that of + or greater lval = child[0] = lval['ch'][0] - lnt = '+' + lnt = lval['nt'] # Addition of integers, strings, and lists is distributive # Addition of floats, vectors and rotations would be, except