Some forward-looking changes for destructuring-bind.
commit8289475b7a545dcfae7aa07a54a3a022fdd648fe
authorDouglas Katzman <dougk@google.com>
Tue, 16 Jun 2015 22:44:55 +0000 (16 18:44 -0400)
committerDouglas Katzman <dougk@google.com>
Tue, 16 Jun 2015 22:44:55 +0000 (16 18:44 -0400)
tree730b1e59a2721158db9a7beb5e3052096eea8e7e
parent9741c6058a8b09e9cb564486324e540bb402d75b
Some forward-looking changes for destructuring-bind.

- &OPTIONAL with no variables when unparsing a ds-lambda-list matters.
Otherwise the lambda list (A &OPTIONAL ((&OPTIONAL))) - which is merely "weird"
turns into (A &OPTIONAL (())) which is not only weird, but illegal,
because () is another spelling for NIL, and NIL is a constant.
The former lambda list takes 1 or 2 arguments. The 2nd argument, if supplied,
must be NIL, because it binds to a lambda that accepts zero things.

- Add DS-LAMBDA-LIST-SYMBOLS which extracts all bound symbols.
src/code/early-extensions.lisp
src/compiler/fndb.lisp
src/compiler/parse-lambda-list.lisp
tests/lambda-list.pure.lisp