mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
peg: hygiene in cg-peg-any
* module/ice-9/peg.scm (cg-peg-any): Use cggl-syn and cggr-syn.
This commit is contained in:
parent
6f6c7d15a2
commit
febe6dadab
1 changed files with 4 additions and 4 deletions
|
@ -212,10 +212,10 @@
|
|||
(let ((str (syntax str))
|
||||
(strlen (syntax strlen))
|
||||
(at (syntax at)))
|
||||
(datum->syntax for-syntax
|
||||
(cggl for-syntax str strlen at
|
||||
(cggr for-syntax accum
|
||||
'cg-peg-any `(substring ,str ,at (+ ,at 1)) `(+ ,at 1))))))
|
||||
(cggl-syn for-syntax str strlen at
|
||||
(cggr-syn for-syntax accum
|
||||
'cg-peg-any #`(substring #,str #,at (+ #,at 1))
|
||||
#`(+ #,at 1)))))
|
||||
|
||||
;; Generates code for matching a range of characters between start and end.
|
||||
;; E.g.: (cg-range syntax #\a #\z 'body)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue