(mac format (open close char s i flag) `(when (and (is (,s ,i) ,char) (or ,flag (atend ,i ,s) (and (~whitec (,s (+ ,i 1))) (pos ,char ,s (+ ,i 1))))) (pr (if ,flag ,close ,open)) (zap no ,flag) t)) (if ... ; lots of complicated cases (format "<i>" "</i>" #;between #\* #;at s i ital) nil (format "<b>" "</b>" #;between #\+ #;at s i bold) nil ... ; lots more complicated cases )
(if debug* (mac capture-debug-info () '( debug 't dynamic-env env line-num line-num)) (mac capture-debug-info () '( debug nil))) (obj @(capture-debug-info) type 'literal-expression val 36)
(def obj+ args (w/table result (each arg args (each (k v) arg (= result.k v))))) (if debug* (mac capture-debug-info () '(obj debug 't dynamic-env env line-num line-num)) (mac capture-debug-info () '(obj debug nil))) (obj+ (capture-debug-info) (obj type 'literal-expression val 36))
(if debug* (mac capture-debug-info body `(obj debug 't dynamic-env env line-num line-num ,@body)) (mac capture-debug-info body `(obj debug nil ,@body))) (capture-debug-info type 'literal-expression val 36)
-----