liufengyun / gestalt

gestalt : portable and solid macros for Scala
https://github.com/scalacenter/macros
31 stars 3 forks source link

Testing quasiquotes and toolbox constructors together #76

Open valdisxp1 opened 7 years ago

valdisxp1 commented 7 years ago

Let's take an arbitrary piece of Scala code as a String. If dotty parser and the quasiquotes produce different trees, it is likely either toolbox or quasiquotes have a bug. In this way we can relatively easily create tests for both quasiquotes and toolbox constructors. There are only a few technical details to figure out before implementing this.

@liufengyun, is quasiquotes producing the same tree as the parser a reasonable design constraint?

liufengyun commented 7 years ago

is quasiquotes producing the same tree as the parser a reasonable design constraint

Yes for most cases, but due to some difference between scala.meta parser and dotty parser, there are some differences, but they are supposed to be semantically equivalent.

In liufengyun/eden, I ported the test set from scala.meta, the quasiquotes there is more robust. Let's discuss more about this today.