Replace a let loop with a for loop

remotes/jackfirth/master
Jack Firth 3 years ago
parent c5a399ff62
commit 8ab74df2fa

@ -217,12 +217,9 @@
nt nt
p p
#f #f
(let loop ([i (sub1 (vector-length p))]) (for/first ([gs (in-vector p (sub1 (vector-length p)) -1 -1)]
(and (>= i 0) #:when (term? gs))
(let ([gs (vector-ref p i)]) (term-prec gs))
(if (term? gs)
(term-prec gs)
(loop (sub1 i))))))
(parse-action #'PROD-RHS #'ACTION)))] (parse-action #'PROD-RHS #'ACTION)))]
[(PROD-RHS (PREC TERM) ACTION) [(PROD-RHS (PREC TERM) ACTION)
(identifier? #'TERM) (identifier? #'TERM)

Loading…
Cancel
Save