From 5e830cf64b2bd21333fd733706fe393a218e5550 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Thu, 27 Jun 2013 02:37:42 +0200 Subject: [PATCH] Wrap non-trivial functions with parenthesis --- src/compiler-codegen.lisp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/compiler-codegen.lisp b/src/compiler-codegen.lisp index e82b841..166c7f9 100644 --- a/src/compiler-codegen.lisp +++ b/src/compiler-codegen.lisp @@ -219,7 +219,12 @@ (js-format "~a" (apply #'code args))) ;; Function call (call - (js-expr (car args)) + (if (symbolp (car args)) + (js-expr (car args)) + (progn + (js-format "(") + (js-expr (car args)) + (js-format ")"))) (js-format "(") (when (cdr args) (with-operator (12 'left) -- 1.7.10.4