Dotty macros: parse dotty expressions

Is it possible to parse dotty expressions?

More specifically I have a case class DNum that holds a double. I would like to parse math expression such as DNum(1) * DNum(2) and know that I am multiplying those 2 objects. I also need to handle function calls.

TIA

Yes, last example of https://dotty.epfl.ch/docs/reference/metaprogramming/macros.html page shows something very similar.

Having another look it. I assume you are refering to https://dotty.epfl.ch/docs/reference/metaprogramming/macros.html#pattern-matching-on-quoted-expressions specifically. If not, please let me know.

Thanks.