Fixes for recent compiler changes.
This commit is contained in:
parent
d30928a97e
commit
de62dc27fc
1 changed files with 18 additions and 17 deletions
|
|
@ -8,7 +8,8 @@
|
|||
|
||||
import json
|
||||
|
||||
when not defined(`{}`):
|
||||
when NimrodPatch <= 4 and NimrodMinor == 9:
|
||||
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 +17,7 @@ when not defined(`{}`):
|
|||
if isNil(node): return nil
|
||||
result = result[key]
|
||||
|
||||
when not defined(`{}=`):
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue