Skip to content

Commit d2cb468

Browse files
committed
scrapping an arguable joke in the macro guide
1 parent d416df2 commit d2cb468

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

overviews/macros/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ It's customary to import `c.universe._`, because it includes a lot of routinely
124124
First of all, the macro needs to parse the provided format string.
125125
Macros run during the compile-time, so they operate on trees, not on values.
126126
This means that the format parameter of the `printf` macro will be a compile-time literal, not an object of type `java.lang.String`.
127-
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.
127+
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.
128128

129129
val Literal(Constant(s_format: String)) = format.tree
130130

0 commit comments

Comments
 (0)