1
0
mirror of https://github.com/janet-lang/janet synced 2025-09-07 13:28:03 +00:00

Add functionality that allows the set macro to

take a tuple as an l-value. Remove the old
multi-sym report in anticipation of a different
mechanism.
This commit is contained in:
Calvin Rose
2019-01-06 19:33:27 -05:00
parent 92e9e64945
commit eae4e0dede
11 changed files with 138 additions and 207 deletions

View File

@@ -44,7 +44,7 @@
"Trim leading newlines"
[str]
(var i 0)
(while (= 10 str.i) (++ i))
(while (= 10 (get str i)) (++ i))
(string/slice str i))
(defn- html-escape
@@ -52,7 +52,7 @@
[str]
(def buf @"")
(loop [byte :in str]
(if-let [rep escapes.byte]
(if-let [rep (get escapes byte)]
(buffer/push-string buf rep)
(buffer/push-byte buf byte)))
buf)
@@ -90,7 +90,7 @@
# Generate parts and print them to stdout
(def parts (seq [[k entry]
:in (sort (pairs (table/getproto _env)))
:when (and entry:doc (not entry:private))]
:when (and (get entry :doc) (not (get entry :private)))]
(emit-item k entry)))
(print
prelude