diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-12-22 21:29:13 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-12-22 21:29:13 -0800 |
commit | 7eef2749ca3282585e65415712ebb810f2462a01 (patch) | |
tree | 80b2d4cbd8b13b256fee53895cf024663587bec9 /stdlib/doc-syms.tl | |
parent | 85721a1b46f0718393b6344de7863a5a90214446 (diff) | |
download | txr-7eef2749ca3282585e65415712ebb810f2462a01.tar.gz txr-7eef2749ca3282585e65415712ebb810f2462a01.tar.bz2 txr-7eef2749ca3282585e65415712ebb810f2462a01.zip |
new feature: defstruct clause macros.
* lisplib.c (struct_set_entries): Trigger autoload on new
symbols define-struct-clause and *struct-clause-expander*.
* stdlib/struct.tl (*struct-clause-expander*): New variable.
(defstruct): expand-slot local function now returns list of
expanded slots, not a single slot; every case in the tree-case
is converted to return a list. The syntax of a slot clause is
first expanded through *struct-clause-expander hash; if that
works then the resulting list is further scanned for
expansions.
(define-struct-clause): New macro.
(:delegate): New struct clause defined with
define-struct-clause. Provides single-slot delegation.
* tests/012/oop.tl: Tests for :delegate.
* txr.1: Documented define-struct-clause and :delegate.
* stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'stdlib/doc-syms.tl')
-rw-r--r-- | stdlib/doc-syms.tl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/stdlib/doc-syms.tl b/stdlib/doc-syms.tl index 63894b85..8b263b4c 100644 --- a/stdlib/doc-syms.tl +++ b/stdlib/doc-syms.tl @@ -76,6 +76,7 @@ ("/" "D-0049") ("//" "N-0054C409") ("/=" "N-003BE40C") + (":delegate" "N-037F664C") (":key" "N-01697547") (":match" "N-03B92C0D") ("<" "D-0057") @@ -468,6 +469,7 @@ ("define-option-struct" "N-0126C738") ("define-param-expander" "N-019F25A5") ("define-place-macro" "N-02C3089A") + ("define-struct-clause" "N-00FF2A51") ("defmacro" "N-02CAEF0B") ("defmatch" "N-0049315A") ("defmeth" "N-0047C7E8") |