Class

scala.tools.nsc.ast.parser.Parsers

Parser

Related Doc: package Parsers

Permalink

abstract class Parser extends ParserCommon

Self Type
Parser
Source
Parsers.scala
Linear Supertypes
Known Subclasses
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Parser
  2. ParserCommon
  3. AnyRef
  4. 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 Parser()

    Permalink

Type Members

  1. class ParserTreeBuilder extends TreeBuilder

    Permalink
  2. trait PatternContextSensitive extends AnyRef

    Permalink

    Methods which implicitly propagate the context in which they were called: either in a pattern context or not.

    Methods which implicitly propagate the context in which they were called: either in a pattern context or not. Formerly, this was threaded through numerous methods as boolean isPattern.

  3. trait SeqContextSensitive extends PatternContextSensitive

    Permalink

    Methods which implicitly propagate whether the initial call took place in a context where sequences are allowed.

    Methods which implicitly propagate whether the initial call took place in a context where sequences are allowed. Formerly, this was threaded through methods as boolean seqOK.

Abstract Value Members

  1. abstract def deprecationWarning(off: Parsers.Offset, msg: String): Unit

    Permalink
    Definition Classes
    ParserCommon
  2. abstract val in: Parsers.Scanner

    Permalink
    Definition Classes
    ParserParserCommon
  3. abstract def incompleteInputError(msg: String): Unit

    Permalink
  4. abstract def parseStartRule: () ⇒ Global.Tree

    Permalink
  5. abstract def source: SourceFile

    Permalink
  6. abstract def syntaxError(offset: Parsers.Offset, msg: String): Unit

    Permalink
  7. abstract def unit: Global.CompilationUnit

    Permalink
  8. abstract def warning(offset: Parsers.Offset, msg: String): Unit

    Permalink
  9. abstract def xmlLiteral(): Global.Tree

    Permalink
  10. abstract def xmlLiteralPattern(): Global.Tree

    Permalink

Concrete Value Members

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

    Permalink

    Test two objects for inequality.

    Test two objects for inequality.

    returns

    true if !(this == that), false otherwise.

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink

    Equivalent to x.hashCode except for boxed numeric types and null.

    Equivalent to x.hashCode except for boxed numeric types and null. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. For null returns a hashcode where null.hashCode throws a NullPointerException.

    returns

    a hash value consistent with ==

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

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

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

    Permalink

    The expression x == that is equivalent to if (x eq null) that eq null else x.equals(that).

    The expression x == that is equivalent to if (x eq null) that eq null else x.equals(that).

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    Definition Classes
    AnyRef → Any
  6. object InfixMode extends Enumeration

    Permalink

    Modes for infix types.

  7. def accept(token: Parsers.Token): Parsers.Offset

    Permalink

    Consume one token of the specified type, or signal an error if it is not there.

    Consume one token of the specified type, or signal an error if it is not there.

    Definition Classes
    ParserParserCommon
  8. def acceptStatSep(): Unit

    Permalink

    semi = nl {nl} | `;`
    nl  = `\n' // where allowed
  9. def acceptStatSepOpt(): Unit

    Permalink
  10. def accessModifierOpt(): Global.Modifiers

    Permalink

    AccessModifier ::= (private | protected) [AccessQualifier]
  11. def accessQualifierOpt(mods: Global.Modifiers): Global.Modifiers

    Permalink

    AccessQualifier ::= `[' (Id | this) `]'
  12. def annotTypeRest(t: Global.Tree): Global.Tree

    Permalink
  13. def annotationExpr(): Global.Tree

    Permalink
  14. def annotations(skipNewLines: Boolean): List[Global.Tree]

    Permalink

    Annotations      ::= {`@' SimpleType {ArgumentExprs}}
    ConsrAnnotations ::= {`@' SimpleType ArgumentExprs}
  15. def argumentExprs(): List[Global.Tree]

    Permalink

    ArgumentExprs ::= `(' [Exprs] `)'
                    | [nl] BlockExpr
  16. def argumentPatterns(): List[Global.Tree]

    Permalink
  17. final def asInstanceOf[T0]: T0

    Permalink

    Cast the receiver object to be of type T0.

    Cast the receiver object to be of type T0.

    Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression 1.asInstanceOf[String] will throw a ClassCastException at runtime, while the expression List(1).asInstanceOf[List[String]] will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested type.

    returns

    the receiver object.

    Definition Classes
    Any
    Exceptions thrown

    ClassCastException if the receiver object is not an instance of the erasure of type T0.

  18. val assumedClosingParens: Map[Int, Int]

    Permalink
  19. def atInPos[T <: Global.Tree](t: T): T

    Permalink
  20. def atPos[T <: Global.Tree](pos: Global.Position)(t: T): T

    Permalink
  21. def atPos[T <: Global.Tree](start: Parsers.Offset, point: Parsers.Offset, end: Parsers.Offset)(t: T): T

    Permalink
  22. def atPos[T <: Global.Tree](start: Parsers.Offset, point: Parsers.Offset)(t: T): T

    Permalink
  23. def atPos[T <: Global.Tree](offset: Parsers.Offset)(t: T): T

    Permalink
  24. def block(): Global.Tree

    Permalink

    Block ::= BlockStatSeq
    Note

    Return tree does not carry position.

  25. def blockExpr(): Global.Tree

    Permalink

    BlockExpr ::= `{' (CaseClauses | Block) `}'
  26. def blockStatSeq(): List[Global.Tree]

    Permalink

    BlockStatSeq ::= { BlockStat semi } [ResultExpr]
    BlockStat    ::= Import
                   | Annotations [implicit] [lazy] Def
                   | Annotations LocalModifiers TmplDef
                   | Expr1
                   |
  27. def bound(tok: Parsers.Token): Global.Tree

    Permalink
  28. def caseBlock(): Global.Tree

    Permalink
  29. def caseClause(): Global.CaseDef

    Permalink
  30. def caseClauses(): List[Global.CaseDef]

    Permalink

    CaseClauses ::= CaseClause {CaseClause}
    CaseClause  ::= case Pattern [Guard] `=>' Block
  31. final def caseSeparated[T](part: ⇒ T): List[T]

    Permalink
    Annotations
    @inline()
  32. def checkAssoc(offset: Parsers.Offset, op: Global.Name, leftAssoc: Boolean): Unit

    Permalink
  33. def checkHeadAssoc(leftAssoc: Boolean): Unit

    Permalink
  34. def checkNoEscapingPlaceholders[T](op: ⇒ T): T

    Permalink
  35. def checkNotByNameOrVarargs(tpt: Global.Tree): Unit

    Permalink

    Check that type parameter is not by name or repeated.

  36. def classDef(start: Parsers.Offset, mods: Global.Modifiers): Global.ClassDef

    Permalink

    ClassDef ::= Id [TypeParamClause] {Annotation}
                 [AccessModifier] ClassParamClauses RequiresTypeOpt ClassTemplateOpt
    TraitDef ::= Id [TypeParamClause] RequiresTypeOpt TraitTemplateOpt
  37. def clone(): AnyRef

    Permalink

    Create a copy of the receiver object.

    Create a copy of the receiver object.

    The default implementation of the clone method is platform dependent.

    returns

    a copy of the receiver object.

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
    Note

    not specified by SLS as a member of AnyRef

  38. final def commaSeparated[T](part: ⇒ T): List[T]

    Permalink
    Annotations
    @inline()
  39. def compilationUnit(): Global.PackageDef

    Permalink

    CompilationUnit ::= {package QualId semi} TopStatSeq
  40. def condExpr(): Global.Tree

    Permalink
  41. def constrBlock(vparamss: List[List[Global.ValDef]]): Global.Tree

    Permalink

    ConstrBlock    ::=  `{' SelfInvocation {semi BlockStat} `}'
  42. def constrExpr(vparamss: List[List[Global.ValDef]]): Global.Tree

    Permalink

    ConstrExpr      ::=  SelfInvocation
                      |  ConstrBlock
  43. def constructorAnnotations(): List[Global.Tree]

    Permalink
  44. def convertToParam(tree: Global.Tree): Global.ValDef

    Permalink

    Convert tree to formal parameter.

  45. def convertToParams(tree: Global.Tree): List[Global.ValDef]

    Permalink

    Convert tree to formal parameter list.

  46. def convertToTypeId(tree: Global.Tree): Global.Tree

    Permalink

    Convert (qual)ident to type identifier.

  47. def defOrDcl(pos: Parsers.Offset, mods: Global.Modifiers): List[Global.Tree]

    Permalink

    Def    ::= val PatDef
             | var PatDef
             | def FunDef
             | type [nl] TypeDef
             | TmplDef
    Dcl    ::= val PatDcl
             | var PatDcl
             | def FunDcl
             | type [nl] TypeDcl
  48. final def dropAnyBraces[T](body: ⇒ T): T

    Permalink
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  49. def ensureEarlyDef(tree: Global.Tree): Global.Tree

    Permalink
  50. def ensuring(cond: (Parser) ⇒ Boolean, msg: ⇒ Any): Parser

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

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

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

    Permalink
    Implicit information
    This member is added by an implicit conversion from Parser to Ensuring[Parser] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  54. def enumerator(isFirst: Boolean, allowNestedIf: Boolean = true): List[Global.Tree]

    Permalink
  55. def enumerators(): List[Global.Tree]

    Permalink

    Enumerators ::= Generator {semi Enumerator}
    Enumerator  ::=  Generator
                  |  Guard
                  |  val Pattern1 `=' Expr
  56. final def eq(arg0: AnyRef): Boolean

    Permalink

    Tests whether the argument (that) is a reference to the receiver object (this).

    Tests whether the argument (that) is a reference to the receiver object (this).

    The eq method implements an equivalence relation on non-null instances of AnyRef, and has three additional properties:

    • It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of x.eq(y) consistently returns true or consistently returns false.
    • For any non-null instance x of type AnyRef, x.eq(null) and null.eq(x) returns false.
    • null.eq(null) returns true.

    When overriding the equals or hashCode methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2), they should be equal to each other (o1 == o2) and they should hash to the same value (o1.hashCode == o2.hashCode).

    returns

    true if the argument is a reference to the receiver object; false otherwise.

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

    Permalink

    The equality method for reference types.

    The equality method for reference types. Default implementation delegates to eq.

    See also equals in scala.Any.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    Definition Classes
    AnyRef → Any
  58. def errorPatternTree: Global.Ident

    Permalink
  59. def errorTermTree: Global.Literal

    Permalink
  60. def errorTypeTree: Global.TypeTree

    Permalink
  61. def expectedMsg(token: Parsers.Token): String

    Permalink
  62. def expectedMsgTemplate(exp: String, fnd: String): String

    Permalink
  63. def expr(location: Location): Global.Tree

    Permalink
  64. def expr(): Global.Tree

    Permalink

    Expr       ::= (Bindings | [`implicit'] Id | `_')  `=>' Expr
                 | Expr1
    ResultExpr ::= (Bindings | Id `:' CompoundType) `=>' Block
                 | Expr1
    Expr1      ::= if `(' Expr `)' {nl} Expr [[semi] else Expr]
                 | try (`{' Block `}' | Expr) [catch `{' CaseClauses `}'] [finally Expr]
                 | while `(' Expr `)' {nl} Expr
                 | do Expr [semi] while `(' Expr `)'
                 | for (`(' Enumerators `)' | `{' Enumerators `}') {nl} [yield] Expr
                 | throw Expr
                 | return [Expr]
                 | [SimpleExpr `.'] Id `=' Expr
                 | SimpleExpr1 ArgumentExprs `=' Expr
                 | PostfixExpr Ascription
                 | PostfixExpr match `{' CaseClauses `}'
    Bindings   ::= `(' [Binding {`,' Binding}] `)'
    Binding    ::= (Id | `_') [`:' Type]
    Ascription ::= `:' CompoundType
                 | `:' Annotation {Annotation}
                 | `:' `_' `*'
  65. def expr0(location: Location): Global.Tree

    Permalink
  66. def exprSimpleType(): Global.Tree

    Permalink
  67. def exprTypeArgs(): List[Global.Tree]

    Permalink
  68. def finalize(): Unit

    Permalink

    Called by the garbage collector on the receiver object when there are no more references to the object.

    Called by the garbage collector on the receiver object when there are no more references to the object.

    The details of when and if the finalize method is invoked, as well as the interaction between finalize and non-local returns and exceptions, are all platform dependent.

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
    Note

    not specified by SLS as a member of AnyRef

  69. def finishBinaryOp(isExpr: Boolean, opinfo: OpInfo, rhs: Global.Tree): Global.Tree

    Permalink
  70. def finishPostfixOp(start: Int, base: List[OpInfo], opinfo: OpInfo): Global.Tree

    Permalink
  71. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Parser to StringFormat[Parser] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  72. implicit def fresh: FreshNameCreator

    Permalink
  73. def funDefOrDcl(start: Int, mods: Global.Modifiers): Global.Tree

    Permalink

    FunDef ::= FunSig [`:' Type] `=' [`macro'] Expr
            |  FunSig [nl] `{' Block `}'
            |  `this' ParamClause ParamClauses
                   (`=' ConstrExpr | [nl] ConstrBlock)
    FunDcl ::= FunSig [`:' Type]
    FunSig ::= id [FunTypeParamClause] ParamClauses
  74. def funDefRest(start: Parsers.Offset, nameOffset: Parsers.Offset, mods: Global.Modifiers, name: Global.Name): Global.Tree

    Permalink
  75. def generator(eqOK: Boolean, allowNestedIf: Boolean = true): List[Global.Tree]

    Permalink

    Generator ::= Pattern1 (`<-' | `=') Expr [Guard]
  76. final def getClass(): Class[_]

    Permalink

    A representation that corresponds to the dynamic class of the receiver object.

    A representation that corresponds to the dynamic class of the receiver object.

    The nature of the representation is platform dependent.

    returns

    a representation that corresponds to the dynamic class of the receiver object.

    Definition Classes
    AnyRef → Any
    Note

    not specified by SLS as a member of AnyRef

  77. def guard(): Global.Tree

    Permalink

    Guard ::= if PostfixExpr
  78. def hashCode(): Int

    Permalink

    The hashCode method for reference types.

    The hashCode method for reference types. See hashCode in scala.Any.

    returns

    the hash code value for this object.

    Definition Classes
    AnyRef → Any
  79. def ident(): Global.Name

    Permalink
  80. def ident(skipIt: Boolean): Global.Name

    Permalink

    Assumed (provisionally) to be TermNames.

  81. def identForType(skipIt: Boolean): Global.TypeName

    Permalink
  82. def identForType(): Global.TypeName

    Permalink

    For when it's known already to be a type name.

  83. def identOrMacro(): Global.Name

    Permalink
  84. def implicitClosure(start: Parsers.Offset, location: Location): Global.Tree

    Permalink

    Expr ::= implicit Id => Expr
  85. def importClause(): List[Global.Tree]

    Permalink

    Import  ::= import ImportExpr {`,' ImportExpr}
  86. def importExpr(): Global.Tree

    Permalink

    ImportExpr ::= StableId `.' (Id | `_' | ImportSelectors)
  87. def importSelector(): Global.ImportSelector

    Permalink

    ImportSelector ::= Id [`=>' Id | `=>' `_']
  88. def importSelectors(): List[Global.ImportSelector]

    Permalink

    ImportSelectors ::= `{' {ImportSelector `,'} (ImportSelector | `_') `}'
  89. final def inBraces[T](body: ⇒ T): T

    Permalink
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  90. final def inBracesOrError[T](body: ⇒ T, alt: T): T

    Permalink
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  91. final def inBracesOrNil[T](body: ⇒ List[T]): List[T]

    Permalink
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  92. final def inBracesOrUnit[T](body: ⇒ Global.Tree): Global.Tree

    Permalink
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  93. final def inBrackets[T](body: ⇒ T): T

    Permalink
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  94. final def inParens[T](body: ⇒ T): T

    Permalink

    Methods inParensOrError and similar take a second argument which, should the next token not be the expected opener (e.g.

    Methods inParensOrError and similar take a second argument which, should the next token not be the expected opener (e.g. LPAREN) will be returned instead of the contents of the groupers. However in all cases accept(LPAREN) will be called, so a parse error will still result. If the grouping is optional, in.token should be tested before calling these methods.

    Definition Classes
    ParserCommon
    Annotations
    @inline()
  95. final def inParensOrError[T](body: ⇒ T, alt: T): T

    Permalink
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  96. final def inParensOrNil[T](body: ⇒ List[T]): List[T]

    Permalink
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  97. final def inParensOrUnit[T](body: ⇒ Global.Tree): Global.Tree

    Permalink
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  98. def isAnnotation: Boolean

    Permalink
  99. def isCaseDefEnd: Boolean

    Permalink
  100. def isDclIntro: Boolean

    Permalink
  101. def isDefIntro: Boolean

    Permalink
  102. def isExprIntro: Boolean

    Permalink
  103. def isExprIntroToken(token: Parsers.Token): Boolean

    Permalink
  104. def isIdent: Boolean

    Permalink
  105. def isIdentExcept(except: Global.Name): Boolean

    Permalink
  106. def isIdentOf(name: Global.Name): Boolean

    Permalink
  107. final def isInstanceOf[T0]: Boolean

    Permalink

    Test whether the dynamic type of the receiver object is T0.

    Test whether the dynamic type of the receiver object is T0.

    Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression 1.isInstanceOf[String] will return false, while the expression List(1).isInstanceOf[List[String]] will return true. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the specified type.

    returns

    true if the receiver object is an instance of erasure of type T0; false otherwise.

    Definition Classes
    Any
  108. def isLiteral: Boolean

    Permalink
  109. def isLiteralToken(token: Parsers.Token): Boolean

    Permalink
  110. def isLocalModifier: Boolean

    Permalink
  111. def isMacro: Boolean

    Permalink
  112. def isModifier: Boolean

    Permalink
  113. def isNumericLit: Boolean

    Permalink
  114. def isRawBar: Boolean

    Permalink
  115. def isRawIdent: Boolean

    Permalink
  116. def isRawStar: Boolean

    Permalink
  117. def isStatSep: Boolean

    Permalink
  118. def isStatSep(token: Parsers.Token): Boolean

    Permalink
  119. def isStatSeqEnd: Boolean

    Permalink
  120. def isTemplateIntro: Boolean

    Permalink
  121. def isTypeIntroToken(token: Parsers.Token): Boolean

    Permalink
  122. def isTypedParam(t: Global.Tree): Boolean

    Permalink
  123. def isUnaryOp: Boolean

    Permalink
  124. def isWildcard(t: Global.Tree): Boolean

    Permalink
  125. def joinComment(trees: ⇒ List[Global.Tree]): List[Global.Tree]

    Permalink

    A hook for joining the comment associated with a definition.

    A hook for joining the comment associated with a definition. Overridden by scaladoc.

  126. def literal(isNegated: Boolean = false, inPattern: Boolean = false, start: Parsers.Offset = in.offset): Global.Tree

    Permalink

    SimpleExpr    ::= literal
                    | symbol
                    | null
  127. def localDef(implicitMod: Int): List[Global.Tree]

    Permalink

    overridable IDE hook for local definitions of blockStatSeq Here's an idea how to fill in start and end positions.

    overridable IDE hook for local definitions of blockStatSeq Here's an idea how to fill in start and end positions. def localDef : List[Tree] = { atEndPos { atStartPos(in.offset) { val annots = annotations(skipNewLines = true) val mods = localModifiers() withAnnotations annots if (!(mods hasFlag ~(Flags.IMPLICIT | Flags.LAZY))) defOrDcl(mods) else List(tmplDef(mods)) } } (in.offset) }

  128. def localModifiers(): Global.Modifiers

    Permalink

    LocalModifiers ::= {LocalModifier}
    LocalModifier  ::= abstract | final | sealed | implicit | lazy
  129. final def lookingAhead[T](body: ⇒ T): T

    Permalink

    Scoping operator used to temporarily look into the future.

    Scoping operator used to temporarily look into the future. Backs up scanner data before evaluating a block and restores it after.

    Annotations
    @inline()
  130. def makeBinop(isExpr: Boolean, left: Global.Tree, op: Global.TermName, right: Global.Tree, opPos: Global.Position, targs: List[Global.Tree] = Nil): Global.Tree

    Permalink

    Create tree representing (unencoded) binary operation expression or pattern.

  131. def makeEmptyPackage(start: Parsers.Offset, stats: List[Global.Tree]): Global.PackageDef

    Permalink
  132. def makeFilter(start: Parsers.Offset, tree: Global.Tree): Global.Apply

    Permalink
  133. def makePackageObject(start: Parsers.Offset, objDef: Global.ModuleDef): Global.PackageDef

    Permalink
  134. def makePackaging(start: Parsers.Offset, pkg: Global.Tree, stats: List[Global.Tree]): Global.PackageDef

    Permalink

    Create a tree representing a packaging.

  135. final def makeParens(body: ⇒ List[Global.Tree]): Global.Parens

    Permalink

    Creates an actual Parens node (only used during parsing.)

    Creates an actual Parens node (only used during parsing.)

    Definition Classes
    ParserCommon
    Annotations
    @inline()
  136. def makeSafeTupleTerm(elems: List[Global.Tree], offset: Parsers.Offset): Global.Tree

    Permalink

    Create a tuple term Tree.

    Create a tuple term Tree. If the arity is not supported, a syntax error is emitted.

  137. def makeSafeTupleType(elems: List[Global.Tree], offset: Parsers.Offset): Global.Tree

    Permalink

    Create a tuple type Tree.

    Create a tuple type Tree. If the arity is not supported, a syntax error is emitted.

  138. def mixinQualifierOpt(): Global.TypeName

    Permalink

    MixinQualifier ::= `[' Id `]'
  139. def modifiers(): Global.Modifiers

    Permalink

    Modifiers ::= {Modifier}
    Modifier  ::= LocalModifier
                |  AccessModifier
                |  override
  140. def multipleArgumentExprs(): List[List[Global.Tree]]

    Permalink

    A succession of argument lists.

  141. final def ne(arg0: AnyRef): Boolean

    Permalink

    Equivalent to !(this eq that).

    Equivalent to !(this eq that).

    returns

    true if the argument is not a reference to the receiver object; false otherwise.

    Definition Classes
    AnyRef
  142. def newLineOpt(): Unit

    Permalink
  143. def newLineOptWhenFollowedBy(token: Parsers.Offset): Unit

    Permalink
  144. def newLineOptWhenFollowing(p: (Parsers.Token) ⇒ Boolean): Unit

    Permalink
  145. def newLinesOpt(): Unit

    Permalink
  146. object noSeq extends SeqContextSensitive

    Permalink

    The implementation for parsing inside of patterns at points where sequences are disallowed.

  147. def nonLocalDefOrDcl: List[Global.Tree]

    Permalink
  148. final def notify(): Unit

    Permalink

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Definition Classes
    AnyRef
    Note

    not specified by SLS as a member of AnyRef

  149. final def notifyAll(): Unit

    Permalink

    Wakes up all threads that are waiting on the receiver object's monitor.

    Wakes up all threads that are waiting on the receiver object's monitor.

    Definition Classes
    AnyRef
    Note

    not specified by SLS as a member of AnyRef

  150. def o2p(offset: Parsers.Offset): Global.Position

    Permalink
  151. def objectDef(start: Parsers.Offset, mods: Global.Modifiers): Global.ModuleDef

    Permalink

    ObjectDef       ::= Id ClassTemplateOpt
  152. var opstack: List[OpInfo]

    Permalink
  153. object outPattern extends PatternContextSensitive

    Permalink

    The implementation of the context sensitive methods for parsing outside of patterns.

  154. def packageObjectDef(start: Parsers.Offset): Global.PackageDef

    Permalink

    Create a tree representing a package object, converting

    Create a tree representing a package object, converting

    package object foo { ... }

    to

    package foo {
      object `package` { ... }
    }
  155. def packageOrPackageObject(start: Parsers.Offset): Global.Tree

    Permalink
  156. def param(owner: Global.Name, implicitmod: Int, caseParam: Boolean): Global.ValDef

    Permalink
  157. def paramClauses(owner: Global.Name, contextBounds: List[Global.Tree], ofCaseClass: Boolean): List[List[Global.ValDef]]

    Permalink

    ParamClauses      ::= {ParamClause} [[nl] `(' implicit Params `)']
    ParamClause       ::= [nl] `(' [Params] `)'
    Params            ::= Param {`,' Param}
    Param             ::= {Annotation} Id [`:' ParamType] [`=' Expr]
    ClassParamClauses ::= {ClassParamClause} [[nl] `(' implicit ClassParams `)']
    ClassParamClause  ::= [nl] `(' [ClassParams] `)'
    ClassParams       ::= ClassParam {`,' ClassParam}
    ClassParam        ::= {Annotation}  [{Modifier} (`val' | `var')] Id [`:' ParamType] [`=' Expr]
  158. def paramType(useStartAsPosition: Boolean): Global.Tree

    Permalink
  159. def paramType(): Global.Tree

    Permalink

    ParamType ::= Type | `=>' Type | Type `*'
  160. def parse(): Global.Tree

    Permalink

    This is the general parse entry point.

  161. def parseRule[T](rule: (Parser.this.type) ⇒ T): T

    Permalink
  162. def parseStats(): List[Global.Tree]

    Permalink

    These are alternative entry points for repl, script runner, toolbox and parsing in macros.

  163. def parseStatsOrPackages(): List[Global.Tree]

    Permalink
  164. def patDefOrDcl(pos: Int, mods: Global.Modifiers): List[Global.Tree]

    Permalink

    PatDef ::= Pattern2 {`,' Pattern2} [`:' Type] `=' Expr
    ValDcl ::= Id {`,' Id} `:' Type
    VarDef ::= PatDef | Id {`,' Id} `:' Type `=' `_'
  165. def path(thisOK: Boolean, typeOK: Boolean): Global.Tree

    Permalink

    Path       ::= StableId
                |  [Ident `.'] this
    AnnotType ::= Path [`.' type]
  166. def pattern(): Global.Tree

    Permalink

    Default entry points into some pattern contexts.

  167. def peekingAhead(tree: ⇒ Global.Tree): Global.Tree

    Permalink

    Perform an operation while peeking ahead.

    Perform an operation while peeking ahead. Pushback if the operation yields an empty tree or blows to pieces.

    Annotations
    @inline()
  168. var placeholderParams: List[Global.ValDef]

    Permalink

    The implicit parameters introduced by _ in the current expression.

    The implicit parameters introduced by _ in the current expression. Parameters appear in reverse order.

  169. def placeholderTypeBoundary(op: ⇒ Global.Tree): Global.Tree

    Permalink
  170. var placeholderTypes: List[Global.TypeDef]

    Permalink

    The placeholderTypes introduced by _ in the current type.

    The placeholderTypes introduced by _ in the current type. Parameters appear in reverse order.

  171. def postfixExpr(): Global.Tree

    Permalink

    PostfixExpr   ::= InfixExpr [Id [nl]]
    InfixExpr     ::= PrefixExpr
                    | InfixExpr Id [nl] InfixExpr
  172. def prefixExpr(): Global.Tree

    Permalink

    PrefixExpr   ::= [`-' | `+' | `~' | `!'] SimpleExpr
  173. def qualId(): Global.Tree

    Permalink

    QualId ::= Id {`.' Id}
  174. def r2p(offset: Parsers.Offset): Global.Position

    Permalink
  175. def r2p(start: Parsers.Offset, mid: Parsers.Offset): Global.Position

    Permalink
  176. def r2p(start: Parsers.Offset, mid: Parsers.Offset, end: Parsers.Offset): Global.Position

    Permalink
  177. def rawIdent(): Global.Name

    Permalink
  178. def readAnnots(part: ⇒ Global.Tree): List[Global.Tree]

    Permalink
  179. def reduceExprStack(base: List[OpInfo], top: Global.Tree): Global.Tree

    Permalink
  180. def reducePatternStack(base: List[OpInfo], top: Global.Tree): Global.Tree

    Permalink
  181. def reduceStack(isExpr: Boolean, base: List[OpInfo], top: Global.Tree, opPrecedence: Precedence, leftAssoc: Boolean): Global.Tree

    Permalink
  182. def reduceStack(isExpr: Boolean, base: List[OpInfo], top: Global.Tree): Global.Tree

    Permalink
  183. def refineStat(): List[Global.Tree]

    Permalink
  184. def refineStatSeq(): List[Global.Tree]

    Permalink

    RefineStatSeq    ::= RefineStat {semi RefineStat}
    RefineStat       ::= Dcl
                       | type TypeDef
                       |
  185. def refinement(): List[Global.Tree]

    Permalink

    Refinement ::= [nl] `{' RefineStat {semi RefineStat} `}'
  186. def resetPackage(): Unit

    Permalink
  187. def scriptBody(): Global.Tree

    Permalink

    This is the parse entry point for code which is not self-contained, e.g.

    This is the parse entry point for code which is not self-contained, e.g. a script which is a series of template statements. They will be swaddled in Trees until the AST is equivalent to the one returned by compilationUnit().

  188. def selector(t: Global.Tree): Global.Tree

    Permalink
  189. def selectors(t: Global.Tree, typeOK: Boolean, dotOffset: Parsers.Offset): Global.Tree

    Permalink
  190. def selfInvocation(vparamss: List[List[Global.ValDef]]): Global.Tree

    Permalink

    SelfInvocation  ::= this ArgumentExprs {ArgumentExprs}
  191. object seqOK extends SeqContextSensitive

    Permalink

    The implementation for parsing inside of patterns at points where sequences are allowed.

  192. def seqPatterns(): List[Global.Tree]

    Permalink
  193. def setInPos[T <: Global.Tree](t: T): T

    Permalink
  194. def simpleExpr(): Global.Tree

    Permalink

    SimpleExpr    ::= new (ClassTemplate | TemplateBody)
                    |  BlockExpr
                    |  SimpleExpr1 [`_']
    SimpleExpr1   ::= literal
                    |  xLiteral
                    |  Path
                    |  `(' [Exprs] `)'
                    |  SimpleExpr `.' Id
                    |  SimpleExpr TypeArgs
                    |  SimpleExpr1 ArgumentExprs
  195. def simpleExprRest(t: Global.Tree, canApply: Boolean): Global.Tree

    Permalink
  196. def skip(targetToken: Parsers.Token): Unit

    Permalink
    Attributes
    protected
  197. def stableId(): Global.Tree

    Permalink

    StableId ::= Id
              |  Path `.' Id
              |  [id `.'] super [`[' id `]']`.' id
  198. def startAnnotType(): Global.Tree

    Permalink
  199. def startInfixType(): Global.Tree

    Permalink
  200. def statSeq(stat: PartialFunction[Parsers.Token, List[Global.Tree]], errorMsg: String = "illegal start of definition"): List[Global.Tree]

    Permalink
  201. def statement(location: Location): Global.Tree

    Permalink
  202. def stripParens(t: Global.Tree): Global.Tree

    Permalink

    Strip the artifitial Parens node to create a tuple term Tree.

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

    Permalink
    Definition Classes
    AnyRef
  204. def syntaxError(offset: Parsers.Offset, msg: String, skipIt: Boolean): Unit

    Permalink
  205. def syntaxError(msg: String, skipIt: Boolean): Unit

    Permalink
  206. def syntaxErrorOrIncomplete(msg: String, skipIt: Boolean): Unit

    Permalink
  207. def syntaxErrorOrIncompleteAnd[T](msg: String, skipIt: Boolean)(and: T): T

    Permalink
  208. def template(): (List[Global.Tree], Global.ValDef, List[Global.Tree])

    Permalink

    ClassTemplate ::= [EarlyDefs with] ClassParents [TemplateBody]
    TraitTemplate ::= [EarlyDefs with] TraitParents [TemplateBody]
    EarlyDefs     ::= `{' [EarlyDef {semi EarlyDef}] `}'
    EarlyDef      ::= Annotations Modifiers PatDef
  209. def templateBody(isPre: Boolean): (Global.ValDef, List[Global.Tree])

    Permalink

    TemplateBody ::= [nl] `{' TemplateStatSeq `}'
    isPre

    specifies whether in early initializer (true) or not (false)

  210. def templateBodyOpt(parenMeansSyntaxError: Boolean): (Global.ValDef, List[Global.Tree])

    Permalink
  211. def templateOpt(mods: Global.Modifiers, name: Global.Name, constrMods: Global.Modifiers, vparamss: List[List[Global.ValDef]], tstart: Parsers.Offset): Global.Template

    Permalink

    ClassTemplateOpt ::= `extends' ClassTemplate | [[`extends'] TemplateBody]
    TraitTemplateOpt ::= TraitExtends TraitTemplate | [[`extends'] TemplateBody] | `<:' TemplateBody
    TraitExtends     ::= `extends' | `<:'
  212. def templateOrTopStatSeq(): List[Global.Tree]

    Permalink
  213. def templateParents(): List[Global.Tree]

    Permalink

    ClassParents       ::= AnnotType {`(' [Exprs] `)'} {with AnnotType}
    TraitParents       ::= AnnotType {with AnnotType}
  214. def templateStat: PartialFunction[Parsers.Token, List[Global.Tree]]

    Permalink
  215. def templateStatSeq(isPre: Boolean): (Global.ValDef, List[Global.Tree])

    Permalink

    TemplateStatSeq  ::= [id [`:' Type] `=>'] TemplateStats
    isPre

    specifies whether in early initializer (true) or not (false)

  216. def templateStats(): List[Global.Tree]

    Permalink

    TemplateStats    ::= TemplateStat {semi TemplateStat}
    TemplateStat     ::= Import
                       | Annotations Modifiers Def
                       | Annotations Modifiers Dcl
                       | Expr1
                       | super ArgumentExprs {ArgumentExprs}
                       |
  217. def tmplDef(pos: Parsers.Offset, mods: Global.Modifiers): Global.Tree

    Permalink

    TmplDef ::= [case] class ClassDef
              |  [case] object ObjectDef
              |  [override] trait TraitDef
  218. def toString(): String

    Permalink

    Creates a String representation of this object.

    Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.

    returns

    a String representation of the object.

    Definition Classes
    AnyRef → Any
  219. final def tokenSeparated[T](separator: Parsers.Token, sepFirst: Boolean, part: ⇒ T): List[T]

    Permalink

    ,or if sepFirst is true,

    part { `sep` part }

    ,or if sepFirst is true,

    { `sep` part }

    . { sep part } }}} part { sep part } }}}

  220. def topLevelTmplDef: Global.Tree

    Permalink

    Hook for IDE, for top-level classes/objects.

  221. def topStat: PartialFunction[Parsers.Token, List[Global.Tree]]

    Permalink
  222. def topStatSeq(): List[Global.Tree]

    Permalink

    TopStatSeq ::= TopStat {semi TopStat}
    TopStat ::= Annotations Modifiers TmplDef
              | Packaging
              | package object objectDef
              | Import
              |
  223. val treeBuilder: ParserTreeBuilder

    Permalink
  224. def typ(): Global.Tree

    Permalink

    These are default entry points into the pattern context sensitive methods: they are all initiated from non-pattern context.

  225. def typeBounds(): Global.TypeBoundsTree

    Permalink

    TypeBounds ::= [`>:' Type] [`<:' Type]
  226. def typeDefOrDcl(start: Parsers.Offset, mods: Global.Modifiers): Global.Tree

    Permalink

    TypeDef ::= type Id [TypeParamClause] `=' Type
              | FunSig `=' Expr
    TypeDcl ::= type Id [TypeParamClause] TypeBounds
  227. def typeOrInfixType(location: Location): Global.Tree

    Permalink
  228. def typeParamClauseOpt(owner: Global.Name, contextBoundBuf: ListBuffer[Global.Tree]): List[Global.TypeDef]

    Permalink

    TypeParamClauseOpt    ::= [TypeParamClause]
    TypeParamClause       ::= `[' VariantTypeParam {`,' VariantTypeParam} `]']
    VariantTypeParam      ::= {Annotation} [`+' | `-'] TypeParam
    FunTypeParamClauseOpt ::= [FunTypeParamClause]
    FunTypeParamClause    ::= `[' TypeParam {`,' TypeParam} `]']
    TypeParam             ::= Id TypeParamClauseOpt TypeBounds {<% Type} {":" Type}
  229. def typedOpt(): Global.Tree

    Permalink

    TypedOpt ::= [`:' Type]
  230. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  233. def warning(msg: String): Unit

    Permalink
  234. def wildcardOrIdent(): Global.Name

    Permalink
  235. def wildcardType(start: Parsers.Offset): Global.Ident

    Permalink

    WildcardType ::= `_' TypeBounds
  236. object xmlSeqOK extends SeqContextSensitive

    Permalink

    For use from xml pattern, where sequence is allowed and encouraged.

  237. def xmlSeqPatterns(): List[Global.Tree]

    Permalink
  238. def [B](y: B): (Parser, B)

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

Deprecated Value Members

  1. def precedence(operator: Global.Name): Int

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 2.11.0) Use scala.reflect.internal.Precedence

Inherited from Parsers.ParserCommon

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Parser to any2stringadd[Parser]

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

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

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

Ungrouped