diff --git a/src/hissp/macros.lissp b/src/hissp/macros.lissp index cd1a89ce..aa1665ca 100644 --- a/src/hissp/macros.lissp +++ b/src/hissp/macros.lissp @@ -2218,44 +2218,44 @@ except ModuleNotFoundError:pass" (let ($#stack (list $#args)) (.reverse $#stack) ,@(i#starmap - XY#(case X (let (obj (next (.reads reader (.replace X "`" "")))) - `(.append ,'$#stack - ,(if-else (|| (literal? obj) - (.startswith Y ",") - (hissp.reader..is_lissp_string obj) - (control-word? obj) - (module-handle? obj) - (quotation? obj)) - (if-else (depth Y) - `(op#getitem (.pop ,'$#stack) ,obj) - obj) - (if-else (|| (depth Y) (not (method? obj))) - `(,obj ,@(XYZW#.#"(X+1-Y-Z)*W" - (depth Y) - (method? obj) - (kwargs? Y) - `((.pop ,'$#stack - ,(op#sub -1 (kwargs? Y))))) - : ,@(when (kwargs? Y) - `(:** (dict (.pop ,'$#stack))))) - `((op#attrgetter ',.#"obj[1:]") - (.pop ,'$#stack)))))) - .#"/" `(.pop ,'$#stack ,(op#sub -1 (depth Y))) - .#"&" `(.append ,'$#stack (,'XY#.#"X[-1-Y]" ,'$#stack ,(depth Y))) - .#"@" `(.append ,'$#stack (.pop ,'$#stack ,(op#sub -2 (depth Y)))) - .#"[" `(.append ,'$#stack - (-<>> (tuple (iter ,'$#stack.pop - (getattr unittest.mock..sentinel - "hissp.]"))) - ,@(when Y `(op#itemgetter - (:<> (,'$#stack.pop)))))) - .#"]" `(.insert ,'$#stack - (op#sub (len ,'$#stack) ,(depth Y)) - (getattr unittest.mock..sentinel "hissp.]")) - .#"*" `(.extend ,'$#stack - (reversed (tuple (.pop ,'$#stack - ,(op#sub -1 (depth Y)))))) - : ()) + XY#(case X + (let (obj (next (.reads reader (.replace X "`" "")))) + `(.append ,'$#stack + : :? ,(if-else (|| (literal? obj) + (.startswith Y ",") + (hissp.reader..is_lissp_string obj) + (control-word? obj) + (module-handle? obj) + (quotation? obj)) + (if-else (depth Y) + `(op#getitem (.pop ,'$#stack) ,obj) + obj) + (if-else (|| (depth Y) (not (method? obj))) + `(,obj ,@(XYZ#.#"(X+1-Y)*Z" + (depth Y) + (kwargs? Y) + `((.pop ,'$#stack + ,(op#sub -1 (kwargs? Y))))) + ,@(when (kwargs? Y) + `(: :** (dict (.pop ,'$#stack))))) + `((op#attrgetter ',([#1:] obj)) + (.pop ,'$#stack)))))) + .#"/" `(.pop ,'$#stack ,(op#sub -1 (depth Y))) + .#"&" `(.append ,'$#stack (,'XY#.#"X[-1-Y]" ,'$#stack ,(depth Y))) + .#"@" `(.append ,'$#stack (.pop ,'$#stack ,(op#sub -2 (depth Y)))) + .#"[" `(.append ,'$#stack + (-<>> (tuple (iter ,'$#stack.pop + (getattr unittest.mock..sentinel + "hissp.]"))) + ,@(when Y `(op#itemgetter + (:<> (,'$#stack.pop)))))) + .#"]" `(.insert ,'$#stack + (op#sub (len ,'$#stack) ,(depth Y)) + (getattr unittest.mock..sentinel "hissp.]")) + .#"*" `(.extend ,'$#stack + (reversed (tuple (.pop ,'$#stack + ,(op#sub -1 (depth Y)))))) + : ()) (reversed (re..findall "([/&@[\]*:]|(?:[^,%^`/&@[\]*:]|`[,%^/&@[\]*:])+)(%?,?\^*)" (hissp..demunge s))))