summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-09-12 19:32:28 -0700
committerPaul Phillips <paulp@improving.org>2012-09-12 20:47:39 -0700
commit5f674e44c5d3dccb55ce080c60d92b8e412d03ac (patch)
tree64362883bda37fa6beb7687364515363f31721a0 /test/files
parent1806830ec802feea0b89f1a71e0dc15c1507b965 (diff)
downloadscala-5f674e44c5d3dccb55ce080c60d92b8e412d03ac.tar.gz
scala-5f674e44c5d3dccb55ce080c60d92b8e412d03ac.tar.bz2
scala-5f674e44c5d3dccb55ce080c60d92b8e412d03ac.zip
Rescued TreeBuilder from the parser.
For too long, Tree Builder has ruled over those who would like to build their own trees. Today marks the start of a new era. Trees are for building, not for parsers to hoard. It's in Global now. The particular motivation is exposing makeNew, and I also added makeAnonymousNew, so rather than this... Apply(Select( Block(List(ClassDef( Modifiers(scala.tools.nsc.symtab.Flags.FINAL), tpnme.ANON_CLASS_NAME, Nil, Template(List(Ident(definitions.AnyRefClass)), emptyValDef, List( DefDef(NoMods, nme.CONSTRUCTOR, Nil, List(Nil), TypeTree(), Block( List(Apply(Select(Super(This(tpnme.EMPTY), tpnme.EMPTY), nme.CONSTRUCTOR), Nil)), Literal(Constant(())) )))))), Apply(Select(New(Ident(tpnme.ANON_CLASS_NAME)), nme.CONSTRUCTOR), Nil)) , sn.GetClass), Nil) We can write this. Apply(Select(makeAnonymousNew(Nil), nme.getClass_), Nil)
Diffstat (limited to 'test/files')
0 files changed, 0 insertions, 0 deletions