From 60aa3f5fcf5db2953e3b215cd85a6b20fb8728fb Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 11 Jan 2018 15:26:51 -0800 Subject: [PATCH] Fixed ipairs->pairs to make dict iteration work. --- lib/control_flow.nom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/control_flow.nom b/lib/control_flow.nom index 240de17..05fb62d 100644 --- a/lib/control_flow.nom +++ b/lib/control_flow.nom @@ -183,7 +183,7 @@ immediately: %continue_labels join= "\n::continue_\(nomsu "var_to_lua_identifier" [%value])::;" # This trashes the loop variables, just like in Python. set %code = ".." - for key,value in ipairs(\(%iterable as lua)) do + for key,value in pairs(\(%iterable as lua)) do \(%key as lua), \(%value as lua) = key, value; \(%body as lua statements)\ ..\%continue_labels