+ ,@(transpile-commands-inner parsed-ast)))
+
+(defun transpile-commands-inner (parsed-ast)
+ (cond
+ ((not parsed-ast) nil)
+ ((and (listp (car parsed-ast)) (eql :let (caar parsed-ast))) (list (handle-let parsed-ast)))
+ (t
+ (cons
+ (transpile-command (car parsed-ast))
+ (transpile-commands-inner (cdr parsed-ast))))))
+
+(defun handle-let (parsed-ast &optional vars)
+ (if
+ (and (listp (car parsed-ast)) (eql :let (caar parsed-ast)))
+ (let
+ ((*local-variables* (cons (second (car parsed-ast)) *local-variables*)))
+ (handle-let
+ (cdr parsed-ast)
+ (cons
+ (list
+ (transpile-reporter (second (car parsed-ast)))
+ (transpile-reporter (third (car parsed-ast))))
+ vars)))
+ `(let*
+ ,vars
+ ,@(transpile-commands-inner parsed-ast))))