mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Removed dot-expander syntax foo
* module/system/base/syntax.scm (expand-dot!, expand-symbol, syntax): Removed, we don't use this syntax any more.
This commit is contained in:
parent
44f38a1f36
commit
a27bf0b7f6
1 changed files with 1 additions and 27 deletions
|
@ -25,7 +25,7 @@
|
|||
%slot-1 %slot-2 %slot-3 %slot-4 %slot-5
|
||||
%slot-6 %slot-7 %slot-8 %slot-9
|
||||
list-fold)
|
||||
:export-syntax (syntax define-type define-record record-case)
|
||||
:export-syntax (define-type define-record record-case)
|
||||
:re-export-syntax (define-record-type))
|
||||
(export-syntax |) ;; emacs doesn't like the |
|
||||
|
||||
|
@ -36,32 +36,6 @@
|
|||
|
||||
(read-set! keywords 'prefix)
|
||||
|
||||
|
||||
;;;
|
||||
;;; Dot expansion
|
||||
;;;
|
||||
|
||||
;; FOO.BAR -> (slot FOO 'BAR)
|
||||
|
||||
(define (expand-dot! x)
|
||||
(cond ((symbol? x) (expand-symbol x))
|
||||
((pair? x)
|
||||
(cond ((eq? (car x) 'quote) x)
|
||||
(else (set-car! x (expand-dot! (car x)))
|
||||
(set-cdr! x (expand-dot! (cdr x)))
|
||||
x)))
|
||||
(else x)))
|
||||
|
||||
(define (expand-symbol x)
|
||||
(let* ((str (symbol->string x)))
|
||||
(if (string-index str #\.)
|
||||
(let ((parts (map string->symbol (string-split str #\.))))
|
||||
`(slot ,(car parts)
|
||||
,@(map (lambda (key) `',key) (cdr parts))))
|
||||
x)))
|
||||
|
||||
(define syntax expand-dot!)
|
||||
|
||||
|
||||
;;;
|
||||
;;; Type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue