~technomancy/fennel

fennel: Add an example of (lua ...) with mangling v1 APPLIED

Jordan Christiansen: 1
 Add an example of (lua ...) with mangling

 1 files changed, 14 insertions(+), 1 deletions(-)
#666211 .build.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~technomancy/fennel/patches/28041/mbox | git am -3
Learn more about email & git

[PATCH fennel] Add an example of (lua ...) with mangling Export this patch

---
 reference.md | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/reference.md b/reference.md
index cb64ef5..2dea3e0 100644
--- a/reference.md
+++ b/reference.md
@@ -1370,7 +1370,20 @@ however note that it must refer to the names after mangling has been
done, because the identifiers must be valid Lua. The Fennel compiler
will emit `foo-bar` as `foo_bar` in the Lua output in order for it to
be valid. When in doubt, inspect the compiler output to see what it
looks like.
looks like. For example the following Fennel code:

```fennel
(let [foo-bar :hello]
  (lua "print(foo_bar .. \" world\")"))
```

will produce this Lua code:

```lua
local foo_bar = "hello"
print(foo_bar .. " world")
return nil
```

Normally in these cases you would want to emit a statement, in which
case you would pass a string of Lua code as the first argument. But
-- 
2.32.0
fennel/patches/.build.yml: SUCCESS in 34s

[Add an example of (lua ...) with mangling][0] from [Jordan Christiansen][1]

[0]: https://lists.sr.ht/~technomancy/fennel/patches/28041
[1]: mailto:xordspar0@gmail.com

✓ #666211 SUCCESS fennel/patches/.build.yml https://builds.sr.ht/~technomancy/job/666211
Thanks; that makes it a lot clearer.

-Phil