aboutsummaryrefslogblamecommitdiff
path: root/compiler/test/dotty/tools/dotc/parsing/showTree.scala
blob: 18b2203d51ed41a3dea10f705c3e18c777aca06e (plain) (tree)
1
2
3
4
5
6
7
8
9



                   
                  

                    
                
 
                                     
 



                                     

                               

                                                          

   
                                         

                                                 
   
 
package dotty.tools
package dotc
package parsing

import ast.Trees._
import ast.desugar
import ast.desugar._
import core.Mode

object showTree extends DeSugarTest {

  import dotty.tools.dotc.ast.untpd._

  import Mode._

  def test(arg: String) = {
    val tree: Tree = parse(arg)
    println("result = " + tree.show)
    println("desugared = " + DeSugar.transform(tree).show)
  }

  def main(args: Array[String]): Unit = {
    test("src/dotty/tools/dotc/core/Types.scala")
    for (arg <- args) test(arg)
  }
}