- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
AST distinction between parameter-less and empty-parameter-list methods
Mon, 2010-12-27, 13:04
hi,
how can i distinguish def x from def x() in an AST construction?
this:
DefDef(
NoMods withPosition (Flags.METHOD, NoPosition),
"x"
Nil, // tparams
Nil, // vparams
TypeTree( NoType ),
EmptyTree // rhs
)
produces def x ... but how do i get the def x()? i tried to use List( Nil ) in place of vparams, but that doesn't change anything it seems.
thanks, -sciss-