1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-17 14:14:49 +00:00

Add doc files to distribution archives.

This commit is contained in:
Calvin Rose 2018-12-15 15:42:27 -05:00
parent 7484a396ac
commit 24b9ae7820
3 changed files with 7 additions and 5 deletions

View File

@ -156,7 +156,7 @@ valtest: $(JANET_TARGET) $(TEST_PROGRAMS)
dist: build/janet-dist.tar.gz
build/janet-%.tar.gz: $(JANET_TARGET) src/include/janet/janet.h \
janet.1 LICENSE CONTRIBUTING.md $(JANET_LIBRARY) README.md
janet.1 LICENSE CONTRIBUTING.md $(JANET_LIBRARY) README.md $(wildcard doc/*)
tar -czvf $@ $^
#################

View File

@ -70,7 +70,7 @@ exit /b 1
@rem Show help
:HELP
@echo.
@echo Usage: build_windows [subcommand=clean,help,test]
@echo Usage: build_windows [subcommand=clean,help,test,dist]
@echo.
@echo Script to build janet on windows. Must be run from the Visual Studio
@echo command prompt.
@ -99,6 +99,7 @@ copy README.md dist\README.md
copy janet.lib dist\janet.lib
copy janet.exp dist\janet.exp
copy src\include\janet\janet.h dist\janet.h
xcopy /s doc dist\doc
exit /b 0
:TESTFAIL

View File

@ -676,7 +676,8 @@ When combined with the unquote special, we get the desired output.
## Hygiene
Sometime when we write macros, we must generate symbols for local bindings. Consider
Sometime when we write macros, we must generate symbols for local bindings. Ignoring that
it could be written as a function, consider
the following macro
```lisp
@ -711,7 +712,7 @@ What happens in the following code?
We want the max to be 14, but this will actually evaluate to 12! This can be understood
if we expand the macro. You can expand macro once in janet using the `(macex1 x)` function.
(To expand macros until there are no macros left to expand, us `(macex x)`. Be careful,
(To expand macros until there are no macros left to expand, use `(macex x)`. Be careful,
janet has many macros, so the full expansion may be almost unreadable).
```lisp
@ -721,7 +722,7 @@ if we expand the macro. You can expand macro once in janet using the `(macex1 x)
After expansion, y wrongly refers to the x inside the macro (which is bound to 8) rather than the x defined
to be 10. The problem is the reuse of the symbol x inside the macro, which overshadowed the original
meaning of the macro.
binding.
Janet provides a general solution to this problem in terms of the `(gensym)` function, which returns
a symbol which is guarenteed to be unique and not collide with any symbols defined previously. We can define