Commit Graph

363 Commits (f8ebafcbb46888211bbbbcb71b82e34556e39664)

Author SHA1 Message Date
Zef Hemel 105908204b Fixes #1253
More accurate type classification and eager evaluation of left "and" operand.
2025-02-22 21:28:00 +01:00
KitAmbraid 31792a3a43
space lua: os.date add support for %U, %V and %W (#1250) 2025-02-22 12:00:54 +01:00
Zef Hemel 538032ea94 Cleanup eval a bit 2025-02-20 07:55:09 +01:00
Zef Hemel 9d3b9a8a22 Reduce code duplication 2025-02-13 20:11:08 +01:00
Zef Hemel cf81594b02 Fixes #1236 2025-02-13 20:11:08 +01:00
Zef Hemel 5b982ac257 Fix syntax highlighting of Lua expressions that start with whitespace 2025-02-10 20:30:37 +01:00
Zef Hemel fb7be2a45a Changelog updates and Lua fixes 2025-02-09 18:37:21 +01:00
Zef Hemel 654151437c Lua: Set string as metatable of string values, allowing for strVal:upper() style invocations 2025-02-09 11:06:15 +01:00
Zef Hemel 6699ac783f Added some more string tests 2025-02-08 20:32:42 +01:00
Zef Hemel 9317d143b3 Fixes #1231 2025-02-08 16:51:31 +01:00
Zef Hemel 44a1ce698e Support plugs to register their own syscalls, using `syscall` (see the index plug for an example) 2025-02-07 15:16:57 +01:00
Zef Hemel eb788c68ca Fixes to template Lua expansion 2025-02-06 12:21:21 +01:00
Zef Hemel e1c997616c Support ${lua expression} in templates 2025-02-06 11:58:27 +01:00
Zef Hemel a169406d37 Lua: huge API breaking change: converted all snake_case APIs to camelCase 2025-02-06 10:04:45 +01:00
Zef Hemel 9ccfe13818 Expose SB instance base URL to Lua 2025-02-06 08:36:43 +01:00
Zef Hemel 4f707e498c Lua: Reject setting metatable to a nil value 2025-02-06 08:36:28 +01:00
Zef Hemel 47ac8cae09 Expose some JS regexp functions to Lua 2025-02-06 08:35:34 +01:00
Zef Hemel 3344845d1f Better tostring for Lua functions 2025-02-06 08:34:38 +01:00
Zef Hemel 4bd3370f71 Improve Lua error reporting 2025-02-06 08:34:23 +01:00
Zef Hemel c5162ff605 Fix command query source 2025-01-30 13:32:03 +01:00
Zef Hemel 71a414d1d4 Lua fix truthiness test 2025-01-26 08:59:44 +01:00
Zef Hemel b8835a07e2 Lua truthiness fixes 2025-01-26 08:07:10 +01:00
Zef Hemel 265aa8dab6 Lua: left eval or 2025-01-26 08:05:52 +01:00
Zef Hemel 236b2a7fdd Lua: tweaks and fixes 2025-01-25 08:29:11 +01:00
Zef Hemel fce78a22f8 More Lua template work 2025-01-22 20:26:37 +01:00
Zef Hemel 21c17ac737 Lua string parsing fixes 2025-01-21 09:08:31 +01:00
Zef Hemel 517cfb209a Lua: Reimplement `template` and `config` in Space Lua, distributed with Library/Std 2025-01-20 23:29:06 +01:00
Zef Hemel 41d5743673 Load .lua files with `dofile` 2025-01-19 16:23:08 +01:00
Zef Hemel 6078452a6c Breaking Lua API changes:
* tpl -> template.new
* define_command -> command.define
* define_event_listener -> event.listen
* tag -> index.tag

Updated in the docs
2025-01-19 14:32:11 +01:00
Zef Hemel 72b4ecdc36 Blacklist shell syscalls in Lua for now (security) 2025-01-19 13:02:01 +01:00
Zef Hemel 11a2adbea6 Lua script block prioritization 2025-01-17 19:10:46 +01:00
Zef Hemel 6d42423e8d Lua fixes 2025-01-17 18:32:13 +01:00
Zef Hemel 6a65912b94 Lua math lib fixes 2025-01-17 18:32:01 +01:00
Zef Hemel 0076208658 Fixes to index APIs 2025-01-17 18:31:17 +01:00
Zef Hemel ae20b81126 Don't hang on using luaToString on recursive data structures 2025-01-17 18:30:29 +01:00
Zef Hemel 83550c1623 Exposing Objects indexing as syscalls 2025-01-17 10:41:02 +01:00
Zef Hemel 66433d27cc Lua math library 2025-01-17 10:40:47 +01:00
Zef Hemel 8b2e76ee51 Lua API docs 2025-01-16 20:05:13 +01:00
Zef Hemel 34e50ae74d Linter fixes 2025-01-16 15:35:56 +01:00
Zef Hemel 55f5a465c8 Lua query fixes 2025-01-16 15:33:18 +01:00
Zef Hemel ccea2200ac JS iterable handling 2025-01-16 12:35:15 +01:00
Zef Hemel ce18078480 Better string handling 2025-01-16 12:34:55 +01:00
Zef Hemel fe9e3c6eda Expose globals in root of Lua scripts 2025-01-16 09:27:11 +01:00
Zef Hemel bd05ac206b Remove dead code 2025-01-15 20:49:05 +01:00
Zef Hemel bc1bdea396 Lua: refactored and extracted test approach 2025-01-15 20:47:58 +01:00
Zef Hemel 5604f6d8c2 Lua: tweaks and docs 2025-01-14 20:26:47 +01:00
Zef Hemel cbf227fa49 Lua Queries: make object attributes variables 2025-01-13 21:17:08 +01:00
Zef Hemel bf6a34f82c Lua Integrated Query 2025-01-13 20:25:39 +01:00
Zef Hemel 2283d16d09 Render scalar arrays as bulleted list 2025-01-13 16:22:39 +01:00
Zef Hemel 61f82869e9
Lua integrated query work (#1205)
* Lua query embeddings
2025-01-12 16:54:04 +01:00