Skip to content

Commit

Permalink
docstring: handle ##lambda (compiled code)
Browse files Browse the repository at this point in the history
  • Loading branch information
pflanze committed Sep 4, 2020
1 parent bc8cd85 commit 2ab753b
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions docstring.scm
Expand Up @@ -8,6 +8,7 @@

(require easy-2
oo-util-lazy
scheme-parse
docstring-base
(cj-gambit-sys decompile)
test)
Expand All @@ -23,9 +24,7 @@ part (using docstrings in code) see `docstring-base.scm`."
"Todo: module docstrings. First do module info."


;; XX lib: share those with (core)scheme parsing modules, or rather
;; (also) with cj-typed! *Except*, here we need to also deal with
;; expanded macros, which isn't necessary there.
;; XX lib: move to scheme-parse.scm, or cj-typed or corescheme ?

(##namespace ("docstring#"
parse-lambda:body
Expand All @@ -39,15 +38,13 @@ part (using docstrings in code) see `docstring-base.scm`."
(def (parse-lambda:body [ilist? exprs]) -> (maybe (pair-of list? ilist?))
"return lambda body and the remainder after the lambda"
(if-let-pair ((expr exprs*) exprs)
(if-let-pair ((a r) expr)
(if (eq? a 'lambda)
(if-let-pair ((argS r*) r)
;; XX handle cj-typed `->`
;; esp. expanded one, ugh.
(cons r* exprs*)
#f)
(if (scheme-parse:lambda? expr)
(if-let-pair ((argS r*) (rest expr))
;; XX handle cj-typed `->`
;; esp. expanded one, ugh.
(cons r* exprs*)
#f)
#f)
#f)
#f))

(def (extract-quoted qv)
Expand Down

0 comments on commit 2ab753b

Please sign in to comment.