From 83463f11c530cb8be311cd418ef7b7f842b21890 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 14 Sep 2017 02:41:10 -0700 Subject: Working string interpolation! --- core.nom | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'core.nom') diff --git a/core.nom b/core.nom index 830e312..810859c 100644 --- a/core.nom +++ b/core.nom @@ -115,13 +115,6 @@ rule "%a != %b": rule "say %str": lua block ["print(utils.repr(", %str, "))"] -rule "printf %str": - lua block ".." - |for _,s in ipairs(vars.str) do - | io.write(utils.repr(s)) - |end - |io.write("\n") - rule "do %action": lua expr "vars.action(compiler, setmetatable({}, {__index=vars}))" @@ -161,6 +154,7 @@ macro block "for %varname in %iterable %body": "\n vars[", %varname, "] = old_loopval" "\nend" + rule "%start up to %stop": lua expr "utils.range(vars.start,vars.stop-1)" -- cgit v1.2.3