aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/collections.nom3
-rw-r--r--core/metaprogramming.nom2
2 files changed, 4 insertions, 1 deletions
diff --git a/core/collections.nom b/core/collections.nom
index 100781b..d99ae49 100644
--- a/core/collections.nom
+++ b/core/collections.nom
@@ -62,6 +62,9 @@ compile [..]
to %list append %item
..to (Lua "table.insert(\(%list as lua expr), \(%item as lua expr))")
+compile [add %item to %list at index %i] to (..)
+ Lua "table.insert(\(%list as lua expr), \(%i as lua expr), \(%item as lua expr))"
+
compile [pop from %list, remove last from %list] to (..)
Lua value "table.remove(\(%list as lua expr))"
diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom
index f78ab50..c81eb74 100644
--- a/core/metaprogramming.nom
+++ b/core/metaprogramming.nom
@@ -3,7 +3,7 @@
This File contains actions for making actions and compile-time actions and some helper
functions to make that easier.
-lua> "NOMSU_CORE_VERSION = 2"
+lua> "NOMSU_CORE_VERSION = 3"
lua> ".."
nomsu.COMPILE_ACTIONS["% -> %"] = function(nomsu, tree, \%args, \%body)
local lua = LuaCode.Value(tree.source, "function(")