~technomancy/fennel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

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

Details
Message ID
<20220107205005.109190-1-xordspar0@gmail.com>
DKIM signature
pass
Download raw message
Patch: +14 -1
---
 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] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CGZQLX0ZR5U9.1J039O71DJGMN@cirno>
In-Reply-To
<20220107205005.109190-1-xordspar0@gmail.com> (view parent)
DKIM signature
missing
Download raw message
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]: xordspar0@gmail.com

✓ #666211 SUCCESS fennel/patches/.build.yml https://builds.sr.ht/~technomancy/job/666211
Details
Message ID
<87fspyzs6p.fsf@mntre-builder>
In-Reply-To
<20220107205005.109190-1-xordspar0@gmail.com> (view parent)
DKIM signature
permerror
Download raw message
Thanks; that makes it a lot clearer.

-Phil
Reply to thread Export thread (mbox)