Fix the binop leg of the parser to correctly consider only a single LHS node
[dbsrgits/SQL-Abstract.git] / lib / SQL / Abstract / Tree.pm
index c6faef9..d60e236 100644 (file)
@@ -419,7 +419,7 @@ sub _recurse_parse {
         @right = $self->_recurse_parse($tokens, PARSE_IN_EXPR);
       }
 
-      @left = [$op => [ @left, @right ]];
+      push @left, [$op => [ (@left ? pop @left : ''), @right ]];
     }
 
     # unary op keywords