pgloader/src/monkey/bind.lisp
Dimitri Fontaine 3c334dcdc4 Refactor the main parser to use the bind macro.
The metabang-bind lib offers a nice bind macro that solves the problem
of ignoring bindings in destructuring-bind, and allows a let* approach
to nested destructuring (wven when mixed with let declarations).

Using that lib (that we already indirectly depend on anyway) simplifies
the parser code substantially.
2014-10-02 17:05:35 +02:00

11 lines
246 B
Common Lisp

;;;
;;; Monkey patch metaband-bind macro to ignore nil:
;;;
;;; https://github.com/gwkkwg/metabang-bind/issues/9
;;;
(in-package #:metabang.bind)
(defun var-ignorable-p (var)
(and (symbolp var) (string= (symbol-name var) (symbol-name '_))))