scala.tools.nsc.ast.parser.Parsers

Parser

abstract class Parser extends ParserCommon

Linear Supertypes
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Parser
  2. ParserCommon
  3. AnyRef
  4. 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

Instance Constructors

  1. new Parser()

Type Members

  1. trait PatternContextSensitive extends AnyRef

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

  2. trait SeqContextSensitive extends PatternContextSensitive

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

Abstract Value Members

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

    Definition Classes
    ParserCommon
  2. abstract def freshName(prefix: String): Global.Name

    Definition Classes
    ParserParserCommon
  3. abstract def freshTermName(prefix: String): Global.TermName

    Definition Classes
    ParserParserCommon
  4. abstract def freshTypeName(prefix: String): Global.TypeName

    Definition Classes
    ParserParserCommon
  5. abstract val in: Parsers.Scanner

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

  7. abstract def o2p(offset: Int): Global.Position

  8. abstract def parseStartRule: () ⇒ Global.Tree

  9. abstract def r2p(start: Int, mid: Int, end: Int): Global.Position

  10. abstract def syntaxError(offset: Int, msg: String): Unit

  11. abstract def warning(offset: Int, msg: String): Unit

  12. abstract def xmlLiteral(): Global.Tree

  13. abstract def xmlLiteralPattern(): Global.Tree

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 Parser to StringAdd[Parser] performed by method StringAdd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (Parser, B)

    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()
  6. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  8. object InfixMode extends Enumeration

    Modes for infix types.

  9. def accept(token: Int): Int

    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
  10. def acceptStatSep(): Unit

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

  12. def accessModifierOpt(): Global.Modifiers

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

    AccessQualifier ::= `[' (Id | this) `]'
  14. def allowTypelessParams: Boolean

  15. def annotTypeRest(t: Global.Tree): Global.Tree

  16. def annotationExpr(): Global.Tree

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

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

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

  20. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  21. val assumedClosingParens: Map[Int, Int]

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

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

  24. def atPos[T <: Global.Tree](start: Int, point: Int, end: Int)(t: T): T

  25. def atPos[T <: Global.Tree](start: Int, point: Int)(t: T): T

  26. def atPos[T <: Global.Tree](offset: Int)(t: T): T

  27. def block(): Global.Tree

    Block ::= BlockStatSeq
    Note

    Return tree does not carry position.

  28. def blockExpr(): Global.Tree

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

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

  31. def caseBlock(): Global.Tree

  32. def caseClause(): Global.CaseDef

  33. def caseClauses(): List[Global.CaseDef]

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

    Annotations
    @inline()
  35. def checkAssoc(offset: Int, op: Global.Name, leftAssoc: Boolean): Unit

  36. def checkLegalExistential(t: Global.Tree): Unit

    Check that tree is a legal clause of a forSome.

  37. def checkNoEscapingPlaceholders[T](op: ⇒ T): T

  38. def checkNotByNameOrVarargs(tpt: Global.Tree): Unit

    Check that type parameter is not by name or repeated.

  39. def classDef(start: Int, mods: Global.Modifiers): Global.ClassDef

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def commaSeparated[T](part: ⇒ T): List[T]

    Annotations
    @inline()
  42. def compilationUnit(): Global.PackageDef

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

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

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

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

  47. def convertToParam(tree: Global.Tree): Global.ValDef

    Convert tree to formal parameter.

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

    Convert tree to formal parameter list.

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

    Convert (qual)ident to type identifier.

  50. def defOrDcl(pos: Int, mods: Global.Modifiers): List[Global.Tree]

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

    Definition Classes
    ParserCommon
    Annotations
    @inline()
  52. def ensuring(cond: (Parser) ⇒ Boolean, msg: ⇒ Any): Parser

    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: (Parser) ⇒ Boolean): Parser

    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 ensuring(cond: Boolean, msg: ⇒ Any): Parser

    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
  55. def ensuring(cond: Boolean): Parser

    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
  56. def enumerators(): List[ParsersCommon.ParserTreeBuilder.Enumerator]

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

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

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

  60. def errorTermTree: Global.Literal

  61. def errorTypeTree: Global.TypeTree

  62. def expectedMsg(token: Int): String

  63. def expr(location: Int): Global.Tree

  64. def expr(): Global.Tree

    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: Int): Global.Tree

  66. def exprSimpleType(): Global.Tree

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

  68. def finalize(): Unit

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

    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()
  70. def funDefOrDcl(start: Int, mods: Global.Modifiers): Global.Tree

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

  72. def generator(enums: ListBuffer[ParsersCommon.ParserTreeBuilder.Enumerator], eqOK: Boolean): Unit

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

    Definition Classes
    AnyRef → Any
  74. def guard(): Global.Tree

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

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

  77. def ident(skipIt: Boolean): Global.Name

    Assumed (provisionally) to be TermNames.

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

  79. def identForType(): Global.TypeName

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

  80. def implicitClosure(start: Int, location: Int): Global.Tree

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

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

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

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

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

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

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

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

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

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

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

    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()
  91. final def inParensOrError[T](body: ⇒ T, alt: T): T

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

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

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

  95. def isDclIntro: Boolean

  96. def isDefIntro: Boolean

  97. def isExprIntro: Boolean

  98. def isExprIntroToken(token: Int): Boolean

  99. def isIdent: Boolean

  100. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  101. def isInterface(mods: Global.Modifiers, body: List[Global.Tree]): Boolean

  102. def isLiteral: Boolean

  103. def isLiteralToken(token: Int): Boolean

  104. def isLocalModifier: Boolean

  105. def isModifier: Boolean

  106. def isNumericLit: Boolean

  107. def isRawBar: Boolean

  108. def isRawStar: Boolean

  109. def isStatSep: Boolean

  110. def isStatSep(token: Int): Boolean

  111. def isStatSeqEnd: Boolean

  112. def isTemplateIntro: Boolean

  113. def isTopLevelIntro: Boolean

  114. def isTypeIntroToken(token: Int): Boolean

  115. def isUnaryOp: Boolean

  116. def isWildcard(t: Global.Tree): Boolean

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

    A hook for joining the comment associated with a definition.

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

  118. def literal(isNegated: Boolean = false, inPattern: Boolean = false, start: Int = in.offset): Global.Tree

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

    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) }

  120. def localModifiers(): Global.Modifiers

    LocalModifiers ::= {LocalModifier}
    LocalModifier  ::= abstract | final | sealed | implicit | lazy
  121. def makeEmptyPackage(start: Int, stats: List[Global.Tree]): Global.PackageDef

  122. def makeFilter(start: Int, tree: Global.Tree): ParsersCommon.ParserTreeBuilder.Filter

  123. def makePackageObject(start: Int, objDef: Global.ModuleDef): Global.PackageDef

  124. def makePackaging(start: Int, pkg: Global.Tree, stats: List[Global.Tree]): Global.PackageDef

    Create a tree representing a packaging.

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

    Creates an actual Parens node (only used during parsing.

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

    Definition Classes
    ParserCommon
    Annotations
    @inline()
  126. def mixinQualifierOpt(): Global.TypeName

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

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

    A succession of argument lists.

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

    Definition Classes
    AnyRef
  130. def newLineOpt(): Unit

  131. def newLineOptWhenFollowedBy(token: Int): Unit

  132. def newLineOptWhenFollowing(p: (Int) ⇒ Boolean): Unit

  133. def newLinesOpt(): Unit

  134. object noSeq extends SeqContextSensitive

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

  135. def nonLocalDefOrDcl: List[Global.Tree]

  136. final def notify(): Unit

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

    Definition Classes
    AnyRef
  138. def objectDef(start: Int, mods: Global.Modifiers): Global.ModuleDef

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

  140. object outPattern extends PatternContextSensitive

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

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

    Create a tree representing a package object, converting

    Create a tree representing a package object, converting

    package object foo { ... }

    to

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

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

    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]
  144. def paramType(useStartAsPosition: Boolean): Global.Tree

  145. def paramType(): Global.Tree

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

    This is the general parse entry point.

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

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

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

    Default entry points into some pattern contexts.

  150. var placeholderParams: List[Global.ValDef]

    The implicit parameters introduced by _ in the current expression.

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

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

  152. var placeholderTypes: List[Global.TypeDef]

    The placeholderTypes introduced by _ in the current type.

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

  153. def postfixExpr(): Global.Tree

    PostfixExpr   ::= InfixExpr [Id [nl]]
    InfixExpr     ::= PrefixExpr
                    | InfixExpr Id [nl] InfixExpr
  154. def precedence(operator: Global.Name): Int

  155. def prefixExpr(): Global.Tree

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

    QualId ::= Id {`.' Id}
  157. def rawIdent(): Global.Name

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

  159. def reduceStack(isExpr: Boolean, base: List[OpInfo], top0: Global.Tree, prec: Int, leftAssoc: Boolean): Global.Tree

  160. def refineStatSeq(): List[Global.Tree]

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

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

  163. def scriptBody(): Global.Tree

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

    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().

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

  165. def selectors(t: Global.Tree, typeOK: Boolean, dotOffset: Int): Global.Tree

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

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

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

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

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

  170. def simpleExpr(): Global.Tree

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

  172. def skip(targetToken: Int): Unit

    Attributes
    protected
  173. def stableId(): Global.Tree

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

  175. def startInfixType(): Global.Tree

  176. def statement(location: Int): Global.Tree

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

    Definition Classes
    AnyRef
  178. def syntaxError(offset: Int, msg: String, skipIt: Boolean): Unit

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

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

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

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

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

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

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

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

  185. def templateOpt(mods: Global.Modifiers, name: Global.Name, constrMods: Global.Modifiers, vparamss: List[List[Global.ValDef]], tstart: Int): Global.Template

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

    ClassParents       ::= AnnotType {`(' [Exprs] `)'} {with AnnotType}
    TraitParents       ::= AnnotType {with AnnotType}
  187. def templateStatSeq(isPre: Boolean): (Global.ValDef, List[Global.Tree])

    TemplateStatSeq  ::= [id [`:' Type] `=>'] TemplateStat {semi TemplateStat}
    TemplateStat     ::= Import
                       | Annotations Modifiers Def
                       | Annotations Modifiers Dcl
                       | Expr1
                       | super ArgumentExprs {ArgumentExprs}
                       |
    isPre

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

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

    Informal - for the repl and other direct parser accessors.

  189. def tmplDef(pos: Int, mods: Global.Modifiers): Global.Tree

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

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

    ,or if sepFirst is true,

    part { `sep` part }

    ,or if sepFirst is true,

    { `sep` part }

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

  192. def topLevelTmplDef: Global.Tree

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

  193. def topStatSeq(): List[Global.Tree]

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

  195. def typ(): Global.Tree

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

  196. def typeBounds(): Global.TypeBoundsTree

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

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

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

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

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

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

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

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

  205. def wildcardOrIdent(): Global.Name

  206. def wildcardType(start: Int): Global.Ident

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

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

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

  209. def [B](y: B): (Parser, B)

    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

Inherited from Parsers.ParserCommon

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion StringAdd from Parser to StringAdd[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