This might be a simple question, but I cant seem to figure out how to change the functionality of the quote macro
I am just trying to make it use a different operator instead of "``" but I cant think of how to write the statement
#normally it is written like this
var str:string = "hello World!"
quote do:
echo `str`
im just trying to make it do something like this
var str:string = "hello World!"
quote do:
echo @str@
You can't change it, because `` is a syntax feature. If you don't want to put str in and just use the variable name "str" then you can do:
var str = "hello World!"
quote do:
echo `"str"`
# will become: echo str
You can't change it, because `` is a syntax feature
Um, no, it's simply a bug ... did you read the documentation for quote? See semQuoteAst in semExprs.nim ... if n.len == 3: expectString(c, n[1]) should be if n.len == 3: expectString(c, n[2])