made some tests green
This commit is contained in:
parent
dd830d2e7d
commit
ae548a696f
8 changed files with 28 additions and 29 deletions
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
type pnode* = ref object of tobject
|
||||
type PNode* = ref object of RootObj
|
||||
|
||||
template litNode (name, ty): stmt =
|
||||
type name* = ref object of PNode
|
||||
|
|
@ -8,7 +8,7 @@ litNode PIntNode, int
|
|||
|
||||
import json
|
||||
|
||||
template withKey*(j: PJsonNode; key: string; varname: expr;
|
||||
template withKey*(j: JsonNode; key: string; varname: expr;
|
||||
body:stmt): stmt {.immediate.} =
|
||||
if j.hasKey(key):
|
||||
let varname{.inject.}= j[key]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue