File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 1010
1111(in-package :diff-backend/results-generator )
1212
13+ (defmacro add-to-ht (key value)
14+ ` (setf (gethash , key ht) , value))
15+
16+ (defmacro with-ht (&body body)
17+ ` (let ((ht (make-hash-table :test #' equal )))
18+ (progn
19+ ,@ body)
20+ ht))
21+
1322(defun get-json-res (obj stream )
1423 (encode-json (gener-res-object obj) stream ))
1524
2433 (encode-json
2534 (with-ht
2635 (loop :for line-num :being :the :hash-key :in comment-table :using (:hash-value val)
27- :do (add-to-ht line-num (alexandria :plist-hash-table val))))
36+ :do (setf ( gethash line-num ht) (alexandria :plist-hash-table val))))
2837 stream ))
2938
3039(defgeneric gener-res-object (obj))
3140
32- (defmacro add-to-ht (key value)
33- ` (setf (gethash , key ht) , value))
34-
35- (defmacro with-ht (&body body)
36- ` (let ((ht (make-hash-table :test #' equal )))
37- (progn
38- ,@ body)
39- ht))
40-
4141(defmethod gener-res-object ((obj defun-node))
4242 (with-ht
4343 (add-to-ht " type" " list" )
You can’t perform that action at this time.
0 commit comments