Skip to content

Instantly share code, notes, and snippets.



Last active Jun 14, 2019
What would you like to do?
package metaobjectTest
Macro printexpr has the following syntax:
printexpr expr;
'printexpr' is a macro keyword and 'expr' is an expression. ';' should
end the macro call.
The macro call
var Int n = 9;
printexpr n + 1;
will print, at runtime,
'n + 1' == 10
object Printexpr
func run {
var Int n = 9;
"""The following line should be, without the quotes, "'n + 1' == 10" """ println;
printexpr n + 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment