From 3efa9fb5bdcf76fe802e10b647770a95c706fefa Mon Sep 17 00:00:00 2001 From: flywind Date: Sun, 23 Feb 2020 07:44:45 +0800 Subject: [PATCH] minor --- src/kview/view.nim | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/kview/view.nim b/src/kview/view.nim index 2dec063..5057285 100644 --- a/src/kview/view.nim +++ b/src/kview/view.nim @@ -21,14 +21,12 @@ macro writeExample*(procDef: untyped): untyped = let res = ident"result" - procNameId = ident("karax_view_proc_name") - procNameDef = newLetStmt(procNameId, procName.toStrLit) + procNameStr = procName.toStrLit procWriteOnce = quote do: once: writeFile(getAppFilename()[0 .. ^5] & "_" & - `procNameId` & ".html", $(`res`)) + `procNameStr` & ".html", $(`res`)) - procDef.body.insert(0, procNameDef) procDef.body.add(procWriteOnce) return procDef