mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
(with-peg-rules): Build proper peg-function
s
* lisp/progmodes/peg.el (with-peg-rules): Use the new (FUNC EXP) feature in `cl-labels`.
This commit is contained in:
parent
79400f4f18
commit
986621ae1f
@ -438,10 +438,9 @@ rulesets defined previously with `define-peg-ruleset'."
|
||||
(macroexpand-all
|
||||
`(cl-labels
|
||||
,(mapcar (lambda (rule)
|
||||
;; FIXME: Use `peg--lambda' as well.
|
||||
`(,(peg--rule-id (car rule))
|
||||
()
|
||||
,(peg--translate-rule-body (car rule) (cdr rule))))
|
||||
(peg--lambda ',(cdr rule) ()
|
||||
,(peg--translate-rule-body (car rule) (cdr rule)))))
|
||||
rules)
|
||||
,@body)
|
||||
`((:peg-rules ,@(append rules (cdr ctx)))
|
||||
|
Loading…
Reference in New Issue
Block a user