mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 03:30:27 +02:00
remove x.foo.bar -> (slot x 'foo 'bar) compile-time translation
* module/language/scheme/translate.scm (trans): Remove compile-time dot expansion.
This commit is contained in:
parent
53db56a030
commit
540d9d871e
1 changed files with 1 additions and 12 deletions
|
@ -137,20 +137,9 @@
|
|||
(trans-pair e (or (location x) l) (car x) (cdr x))
|
||||
(trans e l y))))
|
||||
((symbol? x)
|
||||
(let ((y (symbol-expand x)))
|
||||
(if (symbol? y)
|
||||
(make-ghil-ref e l (ghil-lookup e y))
|
||||
(trans e l y))))
|
||||
(make-ghil-ref e l (ghil-lookup e x)))
|
||||
(else (make-ghil-quote e l x))))
|
||||
|
||||
(define (symbol-expand x)
|
||||
(let loop ((s (symbol->string x)))
|
||||
(let ((i (string-rindex s #\.)))
|
||||
(if i
|
||||
(let ((sym (string->symbol (substring s (1+ i)))))
|
||||
`(slot ,(loop (substring s 0 i)) (quote ,sym)))
|
||||
(string->symbol s)))))
|
||||
|
||||
(define (valid-bindings? bindings . it-is-for-do)
|
||||
(define (valid-binding? b)
|
||||
(pmatch b
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue