Mercurial > core / lisp/lib/cli/repl/top-level.lisp
changeset 698: |
96958d3eb5b0 |
parent: |
0f0e5f9b5c55
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: |
-rw-r--r-- |
description: |
fixes |
5 ;; These macros help with defining a toplevel initialization 6 ;; function. Initialization functions are responsible for parsing runtime 7 ;; options and starting a REPL if needed. 8 ;; (defmacro define-toplevel-init (name (props opts) &body body)) 9 ;; (defmacro define-toplevel-repl (name (props opts) &body body)) 11 (defun default-toplevel-init () 12 (let ((opts (cdr *posix-argv*)) 14 (declare (type list opts)) 18 (sb-impl::startup-error "unexpected end of cli opts")))) 20 (let ((opt (car opts))) 22 ((string= opt "--sysinit") 25 (sb-impl::startup-error "multiple --sysinit opts") 26 (setf sysinit ($pop)))) 28 (if (find "--end-toplevel-options" opts 30 (sb-impl::startup-error "bad toplevel opt: ~S" 34 (setf (cdr *posix-argv*) opts)))))