-
Notifications
You must be signed in to change notification settings - Fork 210
Tim Disney edited this page Feb 14, 2014
·
1 revision
Comments in a rule macro or inside a #{...}
template should "just work". If you want to create comment strings programmatically you can use a token's leadingComments
property.
macro m {
case {_ () } => {
var x = makeValue(42, #{here});
x.token.leadingComments = [{
type: "Line",
value: "hello, world"
}];
return withSyntax ($x = [x]) #{
$x
}
}
}
m()
will expand to
//hello, world
42;