made some tests green

This commit is contained in:
Araq 2014-08-31 12:34:35 +02:00
commit ae548a696f
8 changed files with 28 additions and 29 deletions

View file

@ -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]