From d2cb468dd741bd1d599fae916b9b5efe20f22892 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sun, 10 Feb 2013 10:33:44 +0100 Subject: [PATCH] scrapping an arguable joke in the macro guide --- overviews/macros/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overviews/macros/overview.md b/overviews/macros/overview.md index a3bca7b78b..a704e9da6e 100644 --- a/overviews/macros/overview.md +++ b/overviews/macros/overview.md @@ -124,7 +124,7 @@ It's customary to import `c.universe._`, because it includes a lot of routinely First of all, the macro needs to parse the provided format string. Macros run during the compile-time, so they operate on trees, not on values. This means that the format parameter of the `printf` macro will be a compile-time literal, not an object of type `java.lang.String`. -This also means that the code below won't work for `printf(get_format(), ...)`, because in that case `format` won't be a string literal, but rather an AST that represents a function application. Adjusting the macro to work for arbitrary expressions is left as an exercise for the reader. +This also means that the code below won't work for `printf(get_format(), ...)`, because in that case `format` won't be a string literal, but rather an AST that represents a function application. val Literal(Constant(s_format: String)) = format.tree