mirror of
https://github.com/janet-lang/janet
synced 2024-06-16 18:29:56 +00:00
Add var-
We had defn-, def-, defmacro-, but no var-.
This commit is contained in:
parent
b8df47e063
commit
6f9c9879ca
|
@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.
|
||||||
will generate warnings when compiled against other versions.
|
will generate warnings when compiled against other versions.
|
||||||
- Remove Emscripten build. Instead, use the amalgamated source code with a custom toolchain.
|
- Remove Emscripten build. Instead, use the amalgamated source code with a custom toolchain.
|
||||||
- Update documentation.
|
- Update documentation.
|
||||||
|
- Add `var-`
|
||||||
- Add `module/add-paths`
|
- Add `module/add-paths`
|
||||||
- Add `file/temp`
|
- Add `file/temp`
|
||||||
- Add `mod` function to core.
|
- Add `mod` function to core.
|
||||||
|
|
|
@ -131,7 +131,6 @@
|
||||||
["/nologo" "/MD"]
|
["/nologo" "/MD"]
|
||||||
["-std=c99" "-Wall" "-Wextra"]))
|
["-std=c99" "-Wall" "-Wextra"]))
|
||||||
|
|
||||||
|
|
||||||
# Link to pthreads
|
# Link to pthreads
|
||||||
(def- thread-flags (if is-win [] (if threads? ["-lpthread"] [])))
|
(def- thread-flags (if is-win [] (if threads? ["-lpthread"] [])))
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,11 @@
|
||||||
[name & more]
|
[name & more]
|
||||||
~(def ,name :private ,;more))
|
~(def ,name :private ,;more))
|
||||||
|
|
||||||
|
(defmacro var-
|
||||||
|
"Define a private var that will not be exported."
|
||||||
|
[name & more]
|
||||||
|
~(var ,name :private ,;more))
|
||||||
|
|
||||||
(defn defglobal
|
(defn defglobal
|
||||||
"Dynamically create a global def."
|
"Dynamically create a global def."
|
||||||
[name value]
|
[name value]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user