scala.util.parsing.ast

Binders

trait Binders extends AbstractSyntax with Mappable

This component provides functionality for enforcing variable binding during parse-time.

When parsing simple languages, like Featherweight Scala, these parser combinators will fully enforce the binding discipline. When names are allowed to be left unqualified, these mechanisms would have to be complemented by an extra phase that resolves names that couldn't be resolved using the naive binding rules. (Maybe some machinery to model implicit binders (e.g., this and imported qualifiers) and selection on a binder will suffice?)

Source
Binders.scala
Linear Supertypes
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Binders
  2. Mappable
  3. AbstractSyntax
  4. AnyRef
  5. Any
Implicitly
  1. by StringAdd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract class BinderEnv extends AnyRef

    An environment that maps a NameElement to the scope in which it is bound.

  2. trait BindingSensitive extends AnyRef

  3. case class BoundElement[boundElement <: NameElement](el: boundElement, scope: Scope[boundElement]) extends NameElement with Proxy with BindingSensitive with Product with Serializable

    A BoundElement is bound in a certain scope scope, which keeps track of the actual element that el stands for.

  4. trait Element extends Positional

    The base class for elements of the abstract syntax tree.

  5. trait Mappable[T] extends AnyRef

    Definition Classes
    Mappable
  6. trait Mapper extends AnyRef

    Definition Classes
    Mappable
  7. trait NameElement extends Element

    The base class for elements in the AST that represent names scala.util.parsing.ast.Binders.

  8. trait ReturnAndDo[T] extends AnyRef

    Returns a given result, but executes the supplied closure before returning.

  9. class Scope[binderType <: NameElement] extends AbstractIterable[binderType] with Iterable[binderType]

    A Scope keeps track of one or more syntactic elements that represent bound names.

  10. class UnboundElement[N <: NameElement] extends NameElement

    A variable that escaped its scope (i.

  11. class UnderBinder[binderType <: NameElement, elementT] extends Element with BindingSensitive

    Represents an element with variables that are bound in a certain scope.

Abstract Value Members

  1. abstract def UserNameElementIsMappable[t <: NameElement](self: t): Mappable[t]

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Binders to StringAdd[Binders] performed by method StringAdd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (Binders, B)

    Implicit information
    This member is added by an implicit conversion from Binders to ArrowAssoc[Binders] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. object EmptyBinderEnv extends BinderEnv

  9. implicit def ListIsMappable[t](xs: List[t])(implicit arg0: (t) ⇒ Mappable[t]): Mappable[List[t]]

    Definition Classes
    Mappable
  10. implicit def NameElementIsMappable(self: NameElement): Mappable[NameElement]

  11. implicit def OptionIsMappable[t](xs: Option[t])(implicit arg0: (t) ⇒ Mappable[t]): Mappable[Option[t]]

    Definition Classes
    Mappable
  12. implicit def ScopeIsMappable[bt <: NameElement](scope: Scope[bt])(implicit arg0: (bt) ⇒ Mappable[bt]): Mappable[Scope[bt]]

  13. implicit def StringIsMappable(s: String): Mappable[String]

    Definition Classes
    Mappable
  14. object UnderBinder

  15. implicit def UnderBinderIsMappable[bt <: NameElement, st](ub: UnderBinder[bt, st])(implicit arg0: (bt) ⇒ Mappable[bt], arg1: (st) ⇒ Mappable[st]): Mappable[UnderBinder[bt, st]]

  16. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  17. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  18. def ensuring(cond: (Binders) ⇒ Boolean, msg: ⇒ Any): Binders

    Implicit information
    This member is added by an implicit conversion from Binders to Ensuring[Binders] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: (Binders) ⇒ Boolean): Binders

    Implicit information
    This member is added by an implicit conversion from Binders to Ensuring[Binders] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: Boolean, msg: ⇒ Any): Binders

    Implicit information
    This member is added by an implicit conversion from Binders to Ensuring[Binders] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean): Binders

    Implicit information
    This member is added by an implicit conversion from Binders to Ensuring[Binders] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  24. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  25. def formatted(fmtstr: String): String

    Returns string formatted according to given format string.

    Returns string formatted according to given format string. Format strings are as for String.format (@see java.lang.String.format).

    Implicit information
    This member is added by an implicit conversion from Binders to StringFormat[Binders] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  26. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  27. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  32. def return_[T](result: T): ReturnAndDo[T]

  33. def sequence[bt <: NameElement, st](orig: List[UnderBinder[bt, st]])(implicit arg0: (st) ⇒ Mappable[st]): UnderBinder[bt, List[st]]

    If a list of UnderBinders all have the same scope, they can be turned in to an UnderBinder containing a list of the elements in the original UnderBinder.

    If a list of UnderBinders all have the same scope, they can be turned in to an UnderBinder containing a list of the elements in the original UnderBinder.

    The name sequence comes from the fact that this method's type is equal to the type of monadic sequence.

    Note

    !orig.isEmpty implies orig.forall(ub => ub.scope eq orig(0).scope)

  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  35. def toString(): String

    Definition Classes
    AnyRef → Any
  36. def unsequence[bt <: NameElement, st](orig: UnderBinder[bt, List[st]])(implicit arg0: (st) ⇒ Mappable[st]): List[UnderBinder[bt, st]]

  37. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  38. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  39. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  40. def [B](y: B): (Binders, B)

    Implicit information
    This member is added by an implicit conversion from Binders to ArrowAssoc[Binders] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from ast.Mappable

Inherited from AbstractSyntax

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion StringAdd from Binders to StringAdd[Binders]

Inherited by implicit conversion StringFormat from Binders to StringFormat[Binders]

Inherited by implicit conversion Ensuring from Binders to Ensuring[Binders]

Inherited by implicit conversion ArrowAssoc from Binders to ArrowAssoc[Binders]

Ungrouped