This commit implements facilities to attach leading/trailing comments
to tree nodes. This opens possibilities to use quasiquotes to generate
Scala source code. This feature is implemented by embedding the comments
in the private .origin field. The .origin.input is of type Input.Stream(Comments),
because that was the only Input I could see where we can attach custom
metadata by extending java.io.InputStream. We should clearly extend
scalameta to avoid such hacks.
This commit implements facilities to attach leading/trailing comments to tree nodes. This opens possibilities to use quasiquotes to generate Scala source code. This feature is implemented by embedding the comments in the private
.origin
field. The.origin.input
is of typeInput.Stream(Comments)
, because that was the onlyInput
I could see where we can attach custom metadata by extendingjava.io.InputStream
. We should clearly extend scalameta to avoid such hacks.