diff --git a/ultraviolet/shared/src/test/scala/ultraviolet/DebugAST.scala b/ultraviolet/shared/src/test/scala/ultraviolet/DebugAST.scala index f79f02a..838b36a 100644 --- a/ultraviolet/shared/src/test/scala/ultraviolet/DebugAST.scala +++ b/ultraviolet/shared/src/test/scala/ultraviolet/DebugAST.scala @@ -12,7 +12,20 @@ object DebugAST: import quotes.reflect.* - println(">>> Everything") + println(">>> AST (Shader[In, Out]):") + println(Printer.TreeStructure.show(expr.asTerm)) + println("<<<") + + Expr("Done.") + } + + inline def any[In, Out](inline expr: Any): String = ${ anyToASTImpl('{ expr }) } + + private def anyToASTImpl[In, Out: Type](expr: Expr[Any])(using Quotes): Expr[String] = { + + import quotes.reflect.* + + println(">>> AST (Any):") println(Printer.TreeStructure.show(expr.asTerm)) println("<<<")