Skip to content

Instantly share code, notes, and snippets.

@keyle
Forked from Varriount/evaluation.nim
Last active March 28, 2021 20:44
Show Gist options
  • Save keyle/922192dd7a5ed72e67a7 to your computer and use it in GitHub Desktop.
Save keyle/922192dd7a5ed72e67a7 to your computer and use it in GitHub Desktop.
import macros
macro eval(s: string): expr =
result = parseStmt($s)
eval("echo 5")
@0x802
Copy link

0x802 commented Mar 28, 2021

Error: undeclared identifier: 'expr'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment