mirror of
https://github.com/janet-lang/janet
synced 2024-12-24 23:40:27 +00:00
Fix doc generation.
This commit is contained in:
parent
b84b0e4828
commit
26818a5e5c
@ -1451,7 +1451,7 @@ value, one key will be ignored."
|
||||
where))))
|
||||
|
||||
(if (= (parser/status p) :pending)
|
||||
(onstatus :parse
|
||||
(onstatus :parse
|
||||
(string "unmatched delimiters " (parser/state p))
|
||||
nil
|
||||
where))
|
||||
@ -1539,7 +1539,7 @@ value, one key will be ignored."
|
||||
"The list of paths to look for modules. The followig
|
||||
substitutions are preformed on each path. :sys: becomes
|
||||
module/*syspath*, :name: becomes the last part of the module
|
||||
name after the last /, and :all: is the module name literally.
|
||||
name after the last /, and :all: is the module name literally.
|
||||
:native: becomes the dynamic library file extension, usually dll
|
||||
or so."
|
||||
@["./:all:.janet"
|
||||
|
@ -89,7 +89,7 @@
|
||||
|
||||
# Generate parts and print them to stdout
|
||||
(def parts (seq [[k entry]
|
||||
:in (sort (pairs (table/getproto _env)))
|
||||
:in (sort (pairs (table/getproto *env*)))
|
||||
:when (and (get entry :doc) (not (get entry :private)))]
|
||||
(emit-item k entry)))
|
||||
(print
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
# Constants for checking if symbols should be
|
||||
# highlighted.
|
||||
(def- core-env (table/getproto _env))
|
||||
(def- core-env (table/getproto *env*))
|
||||
(def- specials {'fn true
|
||||
'var true
|
||||
'do true
|
||||
|
@ -10,11 +10,11 @@
|
||||
# can be written to an image (no cfunctions, no abstracts (stdout, stdin, stderr)),
|
||||
# everything else goes. Cfunctions and abstracts will be referenced from a register
|
||||
# table which will be generated on janet startup.
|
||||
(def image (let [env-pairs (pairs (env-lookup _env))
|
||||
(def image (let [env-pairs (pairs (env-lookup *env*))
|
||||
essential-pairs (filter (fn [[k v]] (or (cfunction? v) (abstract? v))) env-pairs)
|
||||
lookup (table ;(mapcat identity essential-pairs))
|
||||
reverse-lookup (invert lookup)]
|
||||
(marshal (table/getproto _env) reverse-lookup)))
|
||||
(marshal (table/getproto *env*) reverse-lookup)))
|
||||
|
||||
# Write image
|
||||
(file/write stdout image)
|
||||
|
Loading…
Reference in New Issue
Block a user