You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import macros, strutils
macro mac(n: expr): expr =
expectKind(n, nnkCall)
expectLen(n, 2)
expectKind(n[1], nnkStrLit)
var s : string = n[1].strVal
s = s.replace("l", "!!") # <--- Offending line right here people
result = newStrLitNode("Your value sir: '$#'" % [s])
const s = mac("HEllo World")
echo s
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: