Omit the bitop tests entirely under 5.1 and 5.2.
Add tests for bitops; tweak docstrings a bit.
Support emitting both foo & bar and bit.band(foo, bar).
Add support for fennel.macro-searchers.
We now have a fennel.macro-searchers table which functions as a
compile-time equivalent to the package.searchers table; anyone can
insert their own searcher functions to change how macros can be found.
The main thing I don't like about this is that it exposes our little
internal trick of passing :env :_COMPILER in the options table to load
things in compiler scope. We have supported this for the environment
for internal reasons for a while, but now we both expand it (to also
affect :scope) and document it as part of the interface, in order to
simplify the implementation of the default macro searcher function.
I don't love that trick; it was originally added in order to allow us
to load plugins in compiler scope without reaching into the guts of
the compiler module, but it feels like a bit of a hack.
We could maybe make it cleaner by exposing make-compiler-scope and
make-compiler-env as part of the public API, but I'm not sure it's
necessary. If this shorthand gets the same job done as adding two more
functions to our already-big API, maybe that's fine. Or we can add the
shorthand now and introduce the other functions later if we determine
they are useful.
Emit "local foo" instead of "local foo = nil"
Factor out named-fn vs anonymous-fn.
But we can't actually treat an anonymous fn differently yet.
Support &as in pattern matches.
Backport long arglist bugfix to bootstrap compiler.
Originally fixed in 0.6.0 in 1fff49891b5fc37e73b49ba0cab4c6a0cd57d0fd
Use semicolon instead of do/end as paren disambiguation.
It's just clearer what it's there for, and it shouldn't give luacheck warnings.
Fix macro stack trace test for 5.1.
Next version will be 0.9.0 not 0.8.2
Include stack trace when macroexpansion fails.
Fix a bug where a literal true in an if condition would emit invalid Lua
Fix behavior when kv table has multiple sequential comments.
Clarify that sym function takes a source table argument now.
A few more formatting fixups.
Reformat remaining few files.
A few manual tweaks on top of the automated reformatting.
Also add format make target.
Reformat everything except compiler/specials.