scala.tools.nsc.ast.parser.Parsers

Parser

abstract class Parser extends ParserCommon

Source
Parsers.scala
Linear Supertypes
Parsers.ParserCommon, AnyRef, Any
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 any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  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 performed by method any2stringadd 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 any2ArrowAssoc 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 annotTypeRest(t: Global.Tree): Global.Tree

  15. def annotationExpr(): Global.Tree

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

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

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

  19. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  20. var assumedClosingParens: Map[Int, Int]

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

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

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

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

  25. def block(): Global.Tree

    Block ::= BlockStatSeq
    Note

    Return tree does not carry position.

  26. def blockExpr(): Global.Tree

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

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

  29. def caseBlock(): Global.Tree

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

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

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

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

    Check that tree is a legal clause of a forSome.

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

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

    Check that type parameter is not by name or repeated.

  36. def checkSize(kind: String, size: Int, max: Int): Unit

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

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

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

    Annotations
    @inline()
  40. def compilationUnit(): Global.Tree

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

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

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

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

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

    Convert tree to formal parameter.

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

    Convert tree to formal parameter list.

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

    Convert (qual)ident to type identifier.

  48. 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
  49. final def dropAnyBraces[T](body: ⇒ T): T

    Definition Classes
    ParserCommon
    Annotations
    @inline()
  50. 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 any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  51. def ensuring(cond: (Parser) ⇒ Boolean): Parser

    Implicit information
    This member is added by an implicit conversion from Parser to Ensuring[Parser] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  52. 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 any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  53. def ensuring(cond: Boolean): Parser

    Implicit information
    This member is added by an implicit conversion from Parser to Ensuring[Parser] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  54. def enumerators(): List[Global.treeBuilder.Enumerator]

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

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

    Definition Classes
    AnyRef → Any
  57. def equalsExpr(): Global.Tree

    EqualsExpr ::= `=' Expr
  58. def errorPatternTree: Global.Ident

  59. def errorTermTree: Global.Literal

  60. def errorTypeTree: Global.TypeTree

  61. def expectedMsg(token: Int): String

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

  63. 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}
                 | `:' `_' `*'
  64. def expr0(location: Int): Global.Tree

  65. def exprSimpleType(): Global.Tree

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

  67. def finalize(): Unit

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

    Implicit information
    This member is added by an implicit conversion from Parser to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  69. 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
  70. def funDefRest(start: Int, nameOffset: Int, mods: Global.Modifiers, name: Global.Name): Global.Tree

  71. def generator(enums: ListBuffer[Global.treeBuilder.Enumerator], eqOK: Boolean): Unit

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

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

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

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

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

    Assumed (provisionally) to be TermNames.

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

  78. def identForType(): Global.TypeName

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

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    ParserCommon
    Annotations
    @inline()
  89. 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()
  90. final def inParensOrError[T](body: ⇒ T, alt: T): T

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

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

    Definition Classes
    ParserCommon
    Annotations
    @inline()
  93. def isDclIntro: Boolean

  94. def isDefIntro: Boolean

  95. def isExprIntro: Boolean

  96. def isExprIntroToken(token: Int): Boolean

  97. def isIdent: Boolean

  98. final def isInstanceOf[T0]: Boolean

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

  100. def isLiteral: Boolean

  101. def isLiteralToken(token: Int): Boolean

  102. def isLocalModifier: Boolean

  103. def isModifier: Boolean

  104. def isNumericLit: Boolean

  105. def isRawBar: Boolean

  106. def isRawStar: Boolean

  107. def isStatSep: Boolean

  108. def isStatSep(token: Int): Boolean

  109. def isStatSeqEnd: Boolean

  110. def isTemplateIntro: Boolean

  111. def isTypeIntro: Boolean

  112. def isTypeIntroToken(token: Int): Boolean

  113. def isUnaryOp: Boolean

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

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

    Join the comment associated with a definition.

  116. def literal(isNegated: Boolean = false, inPattern: Boolean = false): Global.Tree

    SimpleExpr    ::= literal
    | symbol
    | null
    Note

    The returned tree does not yet have a position

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

  118. def localModifiers(): Global.Modifiers

    LocalModifiers ::= {LocalModifier}
    LocalModifier  ::= abstract | final | sealed | implicit | lazy
  119. def makeFilter(start: Int, tree: Global.Tree): Global.treeBuilder.Filter

  120. def makePackageObject(start: Int, objDef: Global.ModuleDef): 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` { ... }
    }
  121. def makePackaging(start: Int, pkg: Global.Tree, stats: List[Global.Tree]): Global.PackageDef

    Create a tree representing a packaging.

  122. 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()
  123. def mixinQualifierOpt(): Global.TypeName

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

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

    A succession of argument lists.

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

    Definition Classes
    AnyRef
  127. def newLineOpt(): Unit

  128. def newLineOptWhenFollowedBy(token: Int): Unit

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

  130. def newLinesOpt(): Unit

  131. object noSeq extends SeqContextSensitive

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

  132. def nonLocalDefOrDcl: List[Global.Tree]

  133. final def notify(): Unit

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

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

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

  137. object outPattern extends PatternContextSensitive

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

  138. def packaging(start: Int): Global.Tree

    Packaging ::= package QualId [nl] `{' TopStatSeq `}'
  139. 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]
  140. def paramType(useStartAsPosition: Boolean): Global.Tree

  141. def paramType(): Global.Tree

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

    This is the general parse entry point.

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

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

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

    Default entry points into some pattern contexts.

  146. def patterns(): List[Global.Tree]

  147. 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.

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

  149. 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.

  150. def postfixExpr(): Global.Tree

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

  152. def prefixExpr(): Global.Tree

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

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

  155. final def readAnnots[T](part: ⇒ T): List[T]

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

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

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

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

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

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

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

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

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

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

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

  166. def simpleExpr(): Global.Tree

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

  168. def skip(targetToken: Int): Unit

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

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

  171. def startInfixType(): Global.Tree

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

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

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

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

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

  177. def template(isTrait: Boolean): (List[Global.Tree], List[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
  178. def templateBody(isPre: Boolean): (Global.ValDef, List[Global.Tree])

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

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

  179. def templateBodyOpt(traitParentSeen: Boolean): (Global.ValDef, List[Global.Tree])

  180. 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' | `<:'
  181. def templateParents(isTrait: Boolean): (List[Global.Tree], List[List[Global.Tree]])

    ClassParents       ::= AnnotType {`(' [Exprs] `)'} {with AnnotType}
    TraitParents       ::= AnnotType {with AnnotType}
  182. 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)

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

    Informal - for the repl and other direct parser accessors.

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

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

    Definition Classes
    AnyRef → Any
  186. 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 } }}}

  187. def topLevelTmplDef: Global.Tree

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

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

    TopStatSeq ::= TopStat {semi TopStat}
    TopStat ::= Annotations Modifiers TmplDef
              | Packaging
              | package object objectDef
              | Import
              |
  189. def typ(): Global.Tree

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

  190. def typeBounds(): Global.TypeBoundsTree

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

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

  193. 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}
  194. def typedOpt(): Global.Tree

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

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

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

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

  199. def wildcardOrIdent(): Global.Name

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

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

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

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

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

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

Shadowed Implict Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from Parser to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (parser: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from Parser to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (parser: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: Parser

    Implicit information
    This member is added by an implicit conversion from Parser to ArrowAssoc[Parser] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (parser: ArrowAssoc[Parser]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: Parser

    Implicit information
    This member is added by an implicit conversion from Parser to Ensuring[Parser] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (parser: Ensuring[Parser]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from Parsers.ParserCommon

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Parser to StringAdd

Inherited by implicit conversion any2stringfmt from Parser to StringFormat

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

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

Ungrouped