mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-02 23:50:47 +02:00
use correct names for quasiquotation operators
Use #{`}#, #{,}# and #{,@}# as the quasiquote, unquote and unquote-splicing operators, respectively. Previously they were named escaping. * module/language/elisp/compile-tree-il.scm (unquote?): Change "\," to "#{,}#". (unquote-splicing): Change "\,@" to "#{,@}#". (#{compile-`}#): Rename from #{compile-\`}#. * module/language/elisp/runtime/function-slot.scm: Import #{compile-`}# instead of #{compile-\`}#, and re-export as #{`}# instead of as #{\`}#. * module/language/elisp/parser.scm (quotation-symbols): * test-suite/tests/elisp-compiler.test ("Eval", "Quotation"): * test-suite/tests/elisp-reader.test ("Parser"): Change "\`", "\,", and "\,@" to "#{`}#", "#{,}#" and "#{,@}#", respectively.
This commit is contained in:
parent
7d6816f0c7
commit
3b93c9b881
5 changed files with 19 additions and 19 deletions
|
@ -49,7 +49,7 @@
|
|||
compile-function
|
||||
compile-defmacro
|
||||
compile-defun
|
||||
compile-\`
|
||||
#{compile-`}#
|
||||
compile-quote))
|
||||
|
||||
;;; Certain common parameters (like the bindings data structure or
|
||||
|
@ -101,10 +101,10 @@
|
|||
;;; unquote/unquote-splicing/backquote form.
|
||||
|
||||
(define (unquote? sym)
|
||||
(and (symbol? sym) (eq? sym '\,)))
|
||||
(and (symbol? sym) (eq? sym '#{,}#)))
|
||||
|
||||
(define (unquote-splicing? sym)
|
||||
(and (symbol? sym) (eq? sym '\,@)))
|
||||
(and (symbol? sym) (eq? sym '#{,@}#)))
|
||||
|
||||
;;; Build a call to a primitive procedure nicely.
|
||||
|
||||
|
@ -876,7 +876,7 @@
|
|||
body))
|
||||
(make-const loc name)))))))
|
||||
|
||||
(defspecial \` (loc args)
|
||||
(defspecial #{`}# (loc args)
|
||||
(pmatch args
|
||||
((,val)
|
||||
(process-backquote loc val))))
|
||||
|
|
|
@ -164,9 +164,9 @@
|
|||
;;; routine in our recursive-descent parser.
|
||||
|
||||
(define quotation-symbols '((quote . quote)
|
||||
(backquote . \`)
|
||||
(unquote . \,)
|
||||
(unquote-splicing . \,@)))
|
||||
(backquote . #{`}#)
|
||||
(unquote . #{,}#)
|
||||
(unquote-splicing . #{,@}#)))
|
||||
|
||||
(define (get-expression lex)
|
||||
(let* ((token (lex 'get))
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
(compile-function . function)
|
||||
(compile-defun . defun)
|
||||
(compile-defmacro . defmacro)
|
||||
(compile-\` . \`)
|
||||
(#{compile-`}# . #{`}#)
|
||||
(compile-quote . quote)))
|
||||
#:duplicates (last)
|
||||
;; special operators
|
||||
|
@ -79,7 +79,7 @@
|
|||
function
|
||||
defun
|
||||
defmacro
|
||||
\`
|
||||
#{`}#
|
||||
quote)
|
||||
;; macros
|
||||
#:re-export (lambda
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue