Packages

c

scala.reflect.api.Trees

LabelDefExtractor

abstract class LabelDefExtractor extends AnyRef

An extractor class to create and pattern match with syntax LabelDef(name, params, rhs).

This AST node does not have direct correspondence to Scala code. It is used for tailcalls and like. For example, while/do are desugared to label defs as follows:

while (cond) body ==> LabelDef($L, List(), if (cond) { body; L$() } else ())
do body while (cond) ==> LabelDef($L, List(), body; if (cond) L$() else ())
Source
Trees.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LabelDefExtractor
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LabelDefExtractor()

Abstract Value Members

  1. abstract def apply(name: Universe.TermName, params: List[Universe.Ident], rhs: Universe.Tree): Universe.LabelDef
  2. abstract def unapply(labelDef: Universe.LabelDef): Option[(Universe.TermName, List[Universe.Ident], Universe.Tree)]

Deprecated Value Members

  1. def apply(sym: Universe.Symbol, params: List[Universe.Symbol], rhs: Universe.Tree)(implicit token: Universe.CompatToken): Universe.LabelDef

    Annotations
    @deprecated
    Deprecated

    (Since version 2.11.0) use internal.labelDef instead

    See also

    InternalApi.labelDef