1
0
mirror of https://github.com/janet-lang/janet synced 2024-09-28 23:10:40 +00:00

Fix doc generation.

This commit is contained in:
Calvin Rose 2019-01-18 12:24:12 -05:00
parent b84b0e4828
commit 26818a5e5c
4 changed files with 6 additions and 6 deletions

View File

@ -1451,7 +1451,7 @@ value, one key will be ignored."
where)))) where))))
(if (= (parser/status p) :pending) (if (= (parser/status p) :pending)
(onstatus :parse (onstatus :parse
(string "unmatched delimiters " (parser/state p)) (string "unmatched delimiters " (parser/state p))
nil nil
where)) where))
@ -1539,7 +1539,7 @@ value, one key will be ignored."
"The list of paths to look for modules. The followig "The list of paths to look for modules. The followig
substitutions are preformed on each path. :sys: becomes substitutions are preformed on each path. :sys: becomes
module/*syspath*, :name: becomes the last part of the module 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 :native: becomes the dynamic library file extension, usually dll
or so." or so."
@["./:all:.janet" @["./:all:.janet"

View File

@ -89,7 +89,7 @@
# Generate parts and print them to stdout # Generate parts and print them to stdout
(def parts (seq [[k entry] (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)))] :when (and (get entry :doc) (not (get entry :private)))]
(emit-item k entry))) (emit-item k entry)))
(print (print

View File

@ -5,7 +5,7 @@
# Constants for checking if symbols should be # Constants for checking if symbols should be
# highlighted. # highlighted.
(def- core-env (table/getproto _env)) (def- core-env (table/getproto *env*))
(def- specials {'fn true (def- specials {'fn true
'var true 'var true
'do true 'do true

View File

@ -10,11 +10,11 @@
# can be written to an image (no cfunctions, no abstracts (stdout, stdin, stderr)), # 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 # everything else goes. Cfunctions and abstracts will be referenced from a register
# table which will be generated on janet startup. # 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) essential-pairs (filter (fn [[k v]] (or (cfunction? v) (abstract? v))) env-pairs)
lookup (table ;(mapcat identity essential-pairs)) lookup (table ;(mapcat identity essential-pairs))
reverse-lookup (invert lookup)] reverse-lookup (invert lookup)]
(marshal (table/getproto _env) reverse-lookup))) (marshal (table/getproto *env*) reverse-lookup)))
# Write image # Write image
(file/write stdout image) (file/write stdout image)