From 8a756842634ae9770ba3f6f9a8677050941e89db Mon Sep 17 00:00:00 2001 From: Grzegorz Adam Hankiewicz Date: Fri, 18 Jul 2014 17:58:38 +0200 Subject: [PATCH] Removes prefix from defined. Fixes #52, refs #51. --- src/babelpkg/compat.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/babelpkg/compat.nim b/src/babelpkg/compat.nim index 408e5df..dbc4c43 100644 --- a/src/babelpkg/compat.nim +++ b/src/babelpkg/compat.nim @@ -8,7 +8,7 @@ import json -when not defined(`json.{}`): +when not defined(`{}`): proc `{}`*(node: PJsonNode, key: string): PJsonNode = ## Transverses the node and gets the given value. If any of the ## names does not exist, returns nil @@ -16,7 +16,7 @@ when not defined(`json.{}`): if isNil(node): return nil result = result[key] -when not defined(`json.{}=`): +when not defined(`{}=`): proc `{}=`*(node: PJsonNode, names: varargs[string], value: PJsonNode) = ## Transverses the node and tries to set the value at the given location ## to `value` If any of the names are missing, they are added