From 6f9c9879cad6ee461490192556520fd38b5c47d5 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Fri, 24 Jan 2020 22:52:28 -0600 Subject: [PATCH] Add var- We had defn-, def-, defmacro-, but no var-. --- CHANGELOG.md | 1 + auxbin/jpm | 1 - src/boot/boot.janet | 5 +++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea3bdaa2..9a956a7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file. will generate warnings when compiled against other versions. - Remove Emscripten build. Instead, use the amalgamated source code with a custom toolchain. - Update documentation. +- Add `var-` - Add `module/add-paths` - Add `file/temp` - Add `mod` function to core. diff --git a/auxbin/jpm b/auxbin/jpm index 16f8203a..a3efee68 100755 --- a/auxbin/jpm +++ b/auxbin/jpm @@ -131,7 +131,6 @@ ["/nologo" "/MD"] ["-std=c99" "-Wall" "-Wextra"])) - # Link to pthreads (def- thread-flags (if is-win [] (if threads? ["-lpthread"] []))) diff --git a/src/boot/boot.janet b/src/boot/boot.janet index 4c2a3304..0fe86439 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -58,6 +58,11 @@ [name & more] ~(def ,name :private ,;more)) +(defmacro var- + "Define a private var that will not be exported." + [name & more] + ~(var ,name :private ,;more)) + (defn defglobal "Dynamically create a global def." [name value]