diff options
author | Araq <rumpf_a@web.de> | 2019-04-01 16:24:04 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-04-01 16:24:04 +0200 |
commit | fda1352ccfdf46610cf18fb9cfeefe6d5c85bc5a (patch) | |
tree | 2a9314c4befc07080fe2692ad10c1bbb81fcf944 /lib | |
parent | cce8d3da27438a6718c8b0d381ccb296f5e1cd4d (diff) | |
download | Nim-fda1352ccfdf46610cf18fb9cfeefe6d5c85bc5a.tar.gz |
json.nim: tiny refactoring
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/json.nim | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/pure/json.nim b/lib/pure/json.nim index 5f00602cb..c05bbc588 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. |