From 33c17eb4716b9620659af410e5c346047e950b21 Mon Sep 17 00:00:00 2001 From: syn Date: Sun, 27 Feb 2011 20:43:35 +0000 Subject: [PATCH] ssql: add check to `define-operator' to fail at macro expansion time rather than at runtime when invalid operator types are given git-svn-id: https://code.call-cc.org/svn/chicken-eggs/release/4/ssql/trunk@22910 fca3e652-9b03-0410-8d7b-ac86a6ce46c4 --- ssql.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ssql.scm b/ssql.scm index 685ebb7..86c0fa2 100644 --- a/ssql.scm +++ b/ssql.scm @@ -18,6 +18,10 @@ ,@(map (lambda (op) (let ((ssql-op (first op)) (type (second op))) + + (unless (memq (strip-syntax type) '(infix suffix prefix function)) + (error "unknown operator syntax type" type)) + (let-optionals (cddr op) ((sql-op (string-upcase (->string (strip-syntax ssql-op)))) (separator #f))