mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 13:30:26 +02:00
peg: module-ref cleanup
* module/ice-9/peg.scm (cg-generic-ret, cg-and-int, cg-body-test): Remove a few needless @ or @@ forms.
This commit is contained in:
parent
49db248111
commit
09a6a7a44a
1 changed files with 4 additions and 4 deletions
|
@ -130,7 +130,7 @@
|
||||||
#`(list #,at body))
|
#`(list #,at body))
|
||||||
(else #`(list #,at
|
(else #`(list #,at
|
||||||
(cond
|
(cond
|
||||||
(((@@ (ice-9 peg) single?) body) (car body))
|
((single? body) (car body))
|
||||||
(else body))))))
|
(else body))))))
|
||||||
((eq? accum 'none)
|
((eq? accum 'none)
|
||||||
#`(list #,at '()))
|
#`(list #,at '()))
|
||||||
|
@ -245,7 +245,7 @@
|
||||||
(let ((newat (car res))
|
(let ((newat (car res))
|
||||||
(newbody (cadr res)))
|
(newbody (cadr res)))
|
||||||
(set! #,at newat)
|
(set! #,at newat)
|
||||||
((@@ (ice-9 peg) push-not-null!) #,body ((@@ (ice-9 peg) single-filter) newbody))
|
(push-not-null! #,body (single-filter newbody))
|
||||||
#,(cg-and-int for-syntax (cdr arglst) accum str strlen at body)))))))
|
#,(cg-and-int for-syntax (cdr arglst) accum str strlen at body)))))))
|
||||||
|
|
||||||
;; Top-level function builder for OR. Reduces to a call to CG-OR-INT.
|
;; Top-level function builder for OR. Reduces to a call to CG-OR-INT.
|
||||||
|
@ -273,9 +273,9 @@
|
||||||
(let ((at2 (car at2-body2))
|
(let ((at2 (car at2-body2))
|
||||||
(body2 (cadr at2-body2)))
|
(body2 (cadr at2-body2)))
|
||||||
(set! #,at at2)
|
(set! #,at at2)
|
||||||
((@@ (ice-9 peg) push-not-null!)
|
(push-not-null!
|
||||||
#,body
|
#,body
|
||||||
((@@ (ice-9 peg) single-filter) body2))
|
(single-filter body2))
|
||||||
#t)))))
|
#t)))))
|
||||||
|
|
||||||
;; Returns a block of code that sees whether NUM wants us to try and match more
|
;; Returns a block of code that sees whether NUM wants us to try and match more
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue