Skip to content

Instantly share code, notes, and snippets.

@zah
Created September 6, 2011 19:14
Show Gist options
  • Select an option

  • Save zah/1198669 to your computer and use it in GitHub Desktop.

Select an option

Save zah/1198669 to your computer and use it in GitHub Desktop.
template HelperTemplate(a, b, c: expr) : expr =
....
template AnotherHelper(x: expr, y: stmt) : stmt =
macro ComplexBuilder(a, b, c, d: expr, y: stmt) : stmt =
var ast1 = getAst(helperTemplate(a,b,c))
var ast2 = getAst(anotherHelper(d, y))
# manipulate them a bit, add more stuff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment