6 lines
127 B
Nim
6 lines
127 B
Nim
import macros, strformat
|
|
|
|
macro eval(s, x: static[string]): untyped =
|
|
parseStmt(&"let x={x}\n{s}")
|
|
|
|
echo(eval("x+1", "3.1"))
|