Fix documentation and toJson signature
This commit is contained in:
parent
41cf963848
commit
f3922bc4e5
1 changed files with 2 additions and 2 deletions
|
|
@ -644,7 +644,7 @@ proc `%`*(elements: openArray[JsonNode]): JsonNode =
|
|||
newSeq(result.elems, elements.len)
|
||||
for i, p in pairs(elements): result.elems[i] = p
|
||||
|
||||
proc toJson(x: expr): expr {.compiletime.} =
|
||||
proc toJson(x: PNimrodNode): PNimrodNode {.compiletime.} =
|
||||
case x.kind
|
||||
of nnkBracket:
|
||||
result = newNimNode(nnkBracket)
|
||||
|
|
@ -663,7 +663,7 @@ proc toJson(x: expr): expr {.compiletime.} =
|
|||
result = prefix(result, "%")
|
||||
|
||||
macro `%*`*(x: expr): expr =
|
||||
## Convert an expression to a JsonParser directly, without having to specify
|
||||
## Convert an expression to a JsonNode directly, without having to specify
|
||||
## `%` for every element.
|
||||
result = toJson(x)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue