aboutsummaryrefslogtreecommitdiff
path: root/lib/core/things.nom
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-03-27 14:40:35 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-03-27 14:40:35 -0700
commitf4dd9664bf4e2a19e0aeee20117107b22bae4cd4 (patch)
tree2ebbf0bf2e2dfe659260659a346fc9377c70ac64 /lib/core/things.nom
parentc92cf76356129b69c15c3aeca30c745671874d88 (diff)
Added support for __index
Diffstat (limited to 'lib/core/things.nom')
-rw-r--r--lib/core/things.nom3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/core/things.nom b/lib/core/things.nom
index e6d215a..42e4c62 100644
--- a/lib/core/things.nom
+++ b/lib/core/things.nom
@@ -59,7 +59,8 @@ $METAMETHOD_MAP = {
.mod = "__mod", ."^" = "__pow", ."&" = "__band", ."|" = "__bor", ."~" = "__bxor"
."~" = "__bnot", ."<<" = "__bshl", .">>" = "__bshr", ."==" = "__eq"
."<" = "__lt", ."<=" = "__le", ."set 1 =" = "__newindex"
- .size = "__len", .iterate = "__ipairs", ."iterate all" = "__pairs"
+ ."fallback for" = "__index", .size = "__len", .iterate = "__ipairs"
+ ."iterate all" = "__pairs"
}
$($ as text like a dict) = ({}'s metatable).__tostring