(Possibly multiple lists of) value arguments of an application.
(Possibly multiple lists of) value arguments of an application.
Nil
if the callee
is not an application.
The tree stripped of the possibly nested applications.
The tree stripped of the possibly nested applications. The original tree if it's not an application.
The callee
unwrapped from type applications.
The callee
unwrapped from type applications.
The original callee
if it's not a type application.
The type arguments of the callee
.
The type arguments of the callee
.
Nil
if the callee
is not a type application.
Applications in Scala can have one of the following shapes:
1) naked core: Ident(_) or Select(_, _) or basically anything else 2) naked core with targs: TypeApply(core, targs) or AppliedTypeTree(core, targs) 3) apply or several applies wrapping a core: Apply(core, _), or Apply(Apply(core, _), _), etc
This class provides different ways to decompose applications and simplifies their analysis.
***Examples*** (TypeApply in the examples can be replaced with AppliedTypeTree)
Ident(foo): * callee = Ident(foo) * core = Ident(foo) * targs = Nil * argss = Nil
TypeApply(foo, List(targ1, targ2...)) * callee = TypeApply(foo, List(targ1, targ2...)) * core = foo * targs = List(targ1, targ2...) * argss = Nil
Apply(foo, List(arg1, arg2...)) * callee = foo * core = foo * targs = Nil * argss = List(List(arg1, arg2...))
Apply(Apply(foo, List(arg21, arg22, ...)), List(arg11, arg12...)) * callee = foo * core = foo * targs = Nil * argss = List(List(arg11, arg12...), List(arg21, arg22, ...))
Apply(Apply(TypeApply(foo, List(targs1, targs2, ...)), List(arg21, arg22, ...)), List(arg11, arg12...)) * callee = TypeApply(foo, List(targs1, targs2, ...)) * core = foo * targs = Nil * argss = List(List(arg11, arg12...), List(arg21, arg22, ...))