Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cxxxr committed Nov 19, 2023
1 parent c72ef13 commit dee94bb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
4 changes: 4 additions & 0 deletions contrib/walker/example.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,7 @@
(loop :for x :from 1 :to 10
:if (f x)
:do (g x))

(loop :for n :in list
:do (f n)
(g n))
6 changes: 3 additions & 3 deletions contrib/walker/loop-form.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -556,13 +556,13 @@
(t
nil)))
(compound-forms (env)
(let ((pos pos)
(let ((first-pos pos)
(exp (next)))
(walker-assert (consp exp))
(cons (walk walker exp env (cons pos path))
(cons (walk walker exp env (cons first-pos path))
(loop :for exp := (lookahead)
:while (consp exp)
:collect (walk walker exp env (cons pos path))
:collect (walk walker exp env (cons (current) path))
:do (next)))))
(compound-forms-with-lazy ()
(let ((pos pos)
Expand Down
15 changes: 15 additions & 0 deletions contrib/walker/tests/test-cases.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -3740,3 +3740,18 @@
:COLLECT :IT)
(1 6))
((1 6) (2)))
((MICROS/WALKER:COLLECT-HIGHLIGHT-PATHS
(LOOP :FOR MICROS/WALKER::N :IN LIST
:DO (MICROS/WALKER::F MICROS/WALKER::N) (MICROS/WALKER::G MICROS/WALKER::N))
(1 7))
((1 7) (1 6) (2)))
((MICROS/WALKER:COLLECT-HIGHLIGHT-PATHS
(LOOP :FOR MICROS/WALKER::N :IN LIST
:DO (MICROS/WALKER::F MICROS/WALKER::N) (MICROS/WALKER::G MICROS/WALKER::N))
(1 6))
((1 7) (1 6) (2)))
((MICROS/WALKER:COLLECT-HIGHLIGHT-PATHS
(LOOP :FOR MICROS/WALKER::N :IN LIST
:DO (MICROS/WALKER::F MICROS/WALKER::N) (MICROS/WALKER::G MICROS/WALKER::N))
(2))
((1 7) (1 6) (2)))

0 comments on commit dee94bb

Please sign in to comment.