diff options
Diffstat (limited to 'tests/macros/tstringinterp.nim')
-rw-r--r-- | tests/macros/tstringinterp.nim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/macros/tstringinterp.nim b/tests/macros/tstringinterp.nim index a500ed56e..bc79cdaba 100644 --- a/tests/macros/tstringinterp.nim +++ b/tests/macros/tstringinterp.nim @@ -19,7 +19,7 @@ template processInterpolations(e: expr) = macro formatStyleInterpolation(e: expr): expr = let e = callsite() - var + var formatString = "" arrayNode = newNimNode(nnkBracket) idx = 1 @@ -27,14 +27,14 @@ macro formatStyleInterpolation(e: expr): expr = proc addString(s: string) = formatString.add(s) - proc addExpr(e: PNimrodNode) = + proc addExpr(e: NimNode) = arrayNode.add(e) formatString.add("$" & $(idx)) inc idx proc addDollar() = formatString.add("$$") - + processInterpolations(e) result = parseExpr("\"x\" % [y]") @@ -43,11 +43,11 @@ macro formatStyleInterpolation(e: expr): expr = macro concatStyleInterpolation(e: expr): expr = let e = callsite() - var args: seq[PNimrodNode] + var args: seq[NimNode] newSeq(args, 0) proc addString(s: string) = args.add(newStrLitNode(s)) - proc addExpr(e: PNimrodNode) = args.add(e) + proc addExpr(e: NimNode) = args.add(e) proc addDollar() = args.add(newStrLitNode"$") processInterpolations(e) @@ -59,7 +59,7 @@ macro concatStyleInterpolation(e: expr): expr = proc sum(a, b, c: int): int = return (a + b + c) -var +var alice = "Alice" bob = "Bob" a = 10 |