From fda1352ccfdf46610cf18fb9cfeefe6d5c85bc5a Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 1 Apr 2019 16:24:04 +0200 Subject: [PATCH] json.nim: tiny refactoring --- lib/pure/json.nim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/pure/json.nim b/lib/pure/json.nim index 5f00602cbf..c05bbc5884 100644 --- a/lib/pure/json.nim +++ b/lib/pure/json.nim @@ -1023,10 +1023,7 @@ proc toIdentNode(typeNode: NimNode): NimNode = proc createGetEnumCall(jsonNode, kindType: NimNode): NimNode = # -> getEnum(`jsonNode`, `kindType`) - let getEnumSym = bindSym("getEnum") - let astStrLit = toStrLit(jsonNode) - let getEnumCall = newCall(getEnumSym, jsonNode, astStrLit, kindType) - return getEnumCall + result = newCall(bindSym("getEnum"), jsonNode, toStrLit(jsonNode), kindType) proc createOfBranchCond(ofBranch, getEnumCall: NimNode): NimNode = ## Creates an expression that acts as the condition for an ``of`` branch.