Packages

  • package root

    The Scala compiler and reflection APIs.

    The Scala compiler and reflection APIs.

    Definition Classes
    root
  • package scala
    Definition Classes
    root
  • package tools
    Definition Classes
    scala
  • package nsc
    Definition Classes
    tools
  • package ast
    Definition Classes
    nsc
  • package parser
    Definition Classes
    ast
  • trait Parsers extends Scanners with MarkupParsers with ParsersCommon

    Performs the following context-free rewritings:

    Performs the following context-free rewritings:

    - Places all pattern variables in Bind nodes. In a pattern, for identifiers x:

                    x  => x @ _
                  x:T  => x @ (_ : T)
    

    • Removes pattern definitions (PatDef's) as follows: If pattern is a simple (typed) identifier:
             val x = e     ==>  val x = e
             val x: T = e  ==>  val x: T = e
      

    if there are no variables in pattern

           val p = e  ==>  e match (case p => ())
    

    if there is exactly one variable in pattern

           val x_1 = e match (case p => (x_1))
    

    if there is more than one variable in pattern

           val p = e  ==>  private synthetic val t$ = e match (case p => (x_1, ..., x_N))
                           val x_1 = t$._1
                           ...
                           val x_N = t$._N
    

    - Removes function types as follows:

           (argtpes) => restpe   ==>   scala.Function_n[argtpes, restpe]
    

    - Wraps naked case definitions in a match as follows:

           { cases }   ==>   (x => x.match {cases}), except when already argument to match
    

    Definition Classes
    parser
  • class SourceFileParser extends Parser
    Definition Classes
    Parsers
  • InfixMode
  • ParserTreeBuilder
  • PatternContextSensitive
  • SeqContextSensitive
  • noSeq
  • outPattern
  • seqOK
  • symbXMLBuilder
  • xmlSeqOK

object symbXMLBuilder extends SymbolicXMLBuilder

Source
Parsers.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. symbXMLBuilder
  2. SymbolicXMLBuilder
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class TextAttache(pos: Global.Position, text: String) extends Product with Serializable

    Attachment for trees deriving from text nodes (Text, CData, entities).

    Attachment for trees deriving from text nodes (Text, CData, entities). Used for coalescing.

    Definition Classes
    SymbolicXMLBuilder

Value Members

  1. def charData(pos: Global.Position, txt: String): Global.Tree
    Definition Classes
    SymbolicXMLBuilder
  2. def comment(pos: Global.Position, text: String): Global.Tree
    Definition Classes
    SymbolicXMLBuilder
  3. def element(pos: Global.Position, qname: String, attrMap: Map[String, Global.Tree], empty: Boolean, args: Seq[Global.Tree]): Global.Tree
    Definition Classes
    SymbolicXMLBuilder
  4. final def entityRef(pos: Global.Position, n: String): Global.Tree
    Definition Classes
    SymbolicXMLBuilder
  5. val global: Parsers.global.type
    Definition Classes
    symbXMLBuilderSymbolicXMLBuilder
  6. def group(pos: Global.Position, args: Seq[Global.Tree]): Global.Tree

    Various node constructions.

    Various node constructions.

    Definition Classes
    SymbolicXMLBuilder
  7. def isEmptyText(t: Global.Tree): Boolean
    Definition Classes
    SymbolicXMLBuilder
  8. def makeText1(txt: Global.Tree): Global.Tree
    Definition Classes
    SymbolicXMLBuilder
  9. def makeTextPat(txt: Global.Tree): Global.Apply
    Definition Classes
    SymbolicXMLBuilder
  10. def makeXMLpat(pos: Global.Position, n: String, args: Seq[Global.Tree]): Global.Tree

    Definition Classes
    SymbolicXMLBuilder
  11. def makeXMLseq(pos: Global.Position, args: Seq[Global.Tree]): Global.Block

    could optimize if args.length == 0, args.length == 1 AND args(0) is <: Node.

    could optimize if args.length == 0, args.length == 1 AND args(0) is <: Node.

    Definition Classes
    SymbolicXMLBuilder
  12. def parseAttribute(pos: Global.Position, s: String): Global.Tree
    Definition Classes
    SymbolicXMLBuilder
  13. def procInstr(pos: Global.Position, target: String, txt: String): Global.Tree
    Definition Classes
    SymbolicXMLBuilder
  14. def splitPrefix(name: String): (Option[String], String)

    Returns (Some(prefix) | None, rest) based on position of ':'

    Returns (Some(prefix) | None, rest) based on position of ':'

    Definition Classes
    SymbolicXMLBuilder
  15. final def text(pos: Global.Position, txt: String): Global.Tree
    Definition Classes
    SymbolicXMLBuilder
  16. def unparsed(pos: Global.Position, str: String): Global.Tree
    Definition Classes
    SymbolicXMLBuilder