Remove expr/stmt (#5857)
This commit is contained in:
parent
52ff244d5d
commit
000b8afd26
168 changed files with 497 additions and 529 deletions
|
|
@ -9,7 +9,7 @@ proc concat(strings: varargs[string]): string =
|
|||
result = newString(0)
|
||||
for s in items(strings): result.add(s)
|
||||
|
||||
template processInterpolations(e: expr) =
|
||||
template processInterpolations(e) =
|
||||
var s = e[1].strVal
|
||||
for f in interpolatedFragments(s):
|
||||
case f.kind
|
||||
|
|
@ -17,7 +17,7 @@ template processInterpolations(e: expr) =
|
|||
of ikDollar: addDollar()
|
||||
of ikVar, ikExpr: addExpr(newCall("$", parseExpr(f.value)))
|
||||
|
||||
macro formatStyleInterpolation(e: expr): expr =
|
||||
macro formatStyleInterpolation(e: untyped): untyped =
|
||||
let e = callsite()
|
||||
var
|
||||
formatString = ""
|
||||
|
|
@ -41,7 +41,7 @@ macro formatStyleInterpolation(e: expr): expr =
|
|||
result[1].strVal = formatString
|
||||
result[2] = arrayNode
|
||||
|
||||
macro concatStyleInterpolation(e: expr): expr =
|
||||
macro concatStyleInterpolation(e: untyped): untyped =
|
||||
let e = callsite()
|
||||
var args: seq[NimNode]
|
||||
newSeq(args, 0)
|
||||
|
|
@ -71,4 +71,3 @@ var
|
|||
s2 = formatStyleInterpolation"Hello ${bob}, ${sum(alice.len, bob.len, 2)}$$"
|
||||
|
||||
write(stdout, s1 & " | " & s2)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue