amnaredo / test

0 stars 0 forks source link

Add ability to print out passed in variable name aka a debug macro #156

Open amnaredo opened 3 years ago

amnaredo commented 3 years ago

e.g.

val x = 23
val y  = "hello"
pprint.debug(x, y, x+y)

Should print:

x = 23, y = "hello", x.+y = "23hello"

See: https://github.com/adamw/scala-macro-debug

ID: 131 Original Author: pathikrit

amnaredo commented 3 years ago

that would be nice

Original Author: lihaoyi

amnaredo commented 3 years ago

Sourcecode 0.1.1 lets you do this trivially, if someone wants to contribute this

Original Author: lihaoyi

amnaredo commented 3 years ago

This has happened https://github.com/lihaoyi/upickle-pprint/blob/master/pprint/shared/src/main/scala/pprint/package.scala#L9

Original Author: lihaoyi