File tree 2 files changed +13
-5
lines changed 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 1902
1902
(error (string " invalid " syntax-str " \" " (deparse el) " \" " ))))))))
1903
1903
1904
1904
(define (expand-if e )
1905
- (if (and (pair? (cadr e)) (eq? (car (cadr e)) '&& ))
1906
- (let ((clauses (cdr (flatten-ex '&& (cadr e)))))
1907
- `(if (&& ,@(map expand-forms clauses))
1908
- ,@(map expand-forms (cddr e))))
1909
- (cons (car e) (map expand-forms (cdr e)))))
1905
+ (let* ((test (cadr e))
1906
+ (blk? (and (pair? test) (eq? (car test) 'block )))
1907
+ (stmts (if blk? (cdr (butlast test)) '() ))
1908
+ (test (if blk? (last test) test)))
1909
+ (if (and (pair? test) (eq? (car test) '&& ))
1910
+ (let ((clauses `(&& ,@(map expand-forms (cdr (flatten-ex '&& test))))))
1911
+ `(if ,(if blk?
1912
+ `(block ,@(map expand-forms stmts) ,clauses)
1913
+ clauses)
1914
+ ,@(map expand-forms (cddr e))))
1915
+ (cons (car e) (map expand-forms (cdr e))))))
1910
1916
1911
1917
; ; move an assignment into the last statement of a block to keep more statements at top level
1912
1918
(define (sink-assignment lhs rhs )
Original file line number Diff line number Diff line change @@ -2691,6 +2691,8 @@ function symcmp36230(vec)
2691
2691
a, b = vec[1 ], vec[2 ]
2692
2692
if isa (a, Symbol) && isa (b, Symbol)
2693
2693
return a == b
2694
+ elseif isa (a, Int) && isa (b, Int)
2695
+ return a == b
2694
2696
end
2695
2697
return false
2696
2698
end
You can’t perform that action at this time.
0 commit comments