Packages

abstract class Parser extends ParserCommon

Self Type
Parser
Source
Parsers.scala
Linear Supertypes
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. Protected

Instance Constructors

  1. new Parser()

Type Members

  1. class ParserTreeBuilder extends TreeBuilder
  2. sealed trait PatternContextSensitive extends AnyRef

    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. final class SeqContextSensitive extends PatternContextSensitive

    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, since: String, actions: List[CodeAction] = Nil): Unit
    Definition Classes
    ParserCommon
  2. abstract val in: Parsers.Scanner
    Definition Classes
    ParserParserCommon
  3. abstract def incompleteInputError(msg: String, actions: List[CodeAction] = Nil): Unit
  4. abstract def parseStartRule: () => Global.Tree
  5. abstract def source: SourceFile
  6. abstract def syntaxError(offset: Parsers.Offset, msg: String, actions: List[CodeAction] = Nil): Unit
  7. abstract def unit: Global.CompilationUnit
  8. abstract def warning(offset: Parsers.Offset, msg: String, category: WarningCategory, actions: List[CodeAction] = Nil): Unit
  9. abstract def xmlLiteral(): Global.Tree
  10. abstract def xmlLiteralPattern(): Global.Tree

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Parser toany2stringadd[Parser] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Parser, B)
    Implicit
    This member is added by an implicit conversion from Parser toArrowAssoc[Parser] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def accept(token: Parsers.Token): Parsers.Offset

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

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

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

    AccessQualifier ::= `[` (Id | this) `]`
  11. def annotTypeRest(t: Global.Tree): Global.Tree
  12. def annotationExpr(): Global.Tree
  13. def annotations(skipNewLines: Boolean): List[Global.Tree]

    Annotations       ::= {`@` SimpleType {ArgumentExprs}}
    ConstrAnnotations ::= {`@` SimpleType ArgumentExprs}
  14. def argumentExprs(): List[Global.Tree]

    ArgumentExprs ::= `(` [Exprs] `)`
                    | `(` `using` Exprs `)`
                    | [nl] BlockExpr
  15. def argumentPatterns(): List[Global.Tree]
  16. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  17. val assumedClosingParens: Map[Int, Int]
  18. def atInPos[T <: Global.Tree](t: T): T
  19. def atPos[T <: Global.Tree](pos: Global.Position)(t: T): T
  20. def atPos[T <: Global.Tree](start: Parsers.Offset, point: Parsers.Offset, end: Parsers.Offset)(t: T): T
  21. def atPos[T <: Global.Tree](start: Parsers.Offset, point: Parsers.Offset)(t: T): T
  22. def atPos[T <: Global.Tree](offset: Parsers.Offset)(t: T): T
  23. def block(): Global.Tree

    Block ::= BlockStatSeq
    Note

    Return tree does not carry position.

  24. def blockExpr(): Global.Tree

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

    BlockStatSeq ::= { BlockStat semi } [ResultExpr]
    BlockStat    ::= Import
                   | Annotations [implicit] [lazy] Def
                   | Annotations LocalModifiers TmplDef
                   | Expr1
                   |
  26. def bound(tok: Parsers.Token): Global.Tree
  27. def caseBlock(): Global.Tree
  28. def caseClause(): Global.CaseDef
  29. def caseClauses(): List[Global.CaseDef]

    CaseClauses ::= CaseClause {CaseClause}
    CaseClause  ::= case Pattern [Guard] `=>` Block
  30. final def caseSeparated[T](part: => T): List[T]
    Annotations
    @inline()
  31. def checkAssoc(offset: Parsers.Offset, op: Global.Name, leftAssoc: Boolean): Unit
  32. def checkHeadAssoc(leftAssoc: Boolean): Unit
  33. def checkKeywordDefinition(): Unit
  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 checkQMarkDefinition(): Unit
  37. def classDef(start: Parsers.Offset, mods: Global.Modifiers): Global.ClassDef

    ClassDef ::= Id [TypeParamClause] ConstrAnnotations
                 [AccessModifier] ClassParamClauses RequiresTypeOpt ClassTemplateOpt
    TraitDef ::= Id [TypeParamClause] RequiresTypeOpt TraitTemplateOpt
  38. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  39. final def commaSeparated[T](part: => T): List[T]

    , with the separator fixed to commas.

    tokenSeparated

    , with the separator fixed to commas.

    Definition Classes
    ParserCommon
    Annotations
    @inline()
  40. def compilationUnit(): Global.PackageDef

    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: Parsers.Offset, 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 ensureEarlyDef(tree: Global.Tree): Global.Tree
  51. def ensuring(cond: (Parser) => Boolean, msg: => Any): Parser
    Implicit
    This member is added by an implicit conversion from Parser toEnsuring[Parser] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  52. def ensuring(cond: (Parser) => Boolean): Parser
    Implicit
    This member is added by an implicit conversion from Parser toEnsuring[Parser] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  53. def ensuring(cond: Boolean, msg: => Any): Parser
    Implicit
    This member is added by an implicit conversion from Parser toEnsuring[Parser] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  54. def ensuring(cond: Boolean): Parser
    Implicit
    This member is added by an implicit conversion from Parser toEnsuring[Parser] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  55. def enumerator(isFirst: Boolean, allowNestedIf: Boolean = true): List[Global.Tree]
  56. def enumerators(): List[Global.Tree]

    Enumerators ::= Generator {semi Enumerator}
    Enumerator  ::=  Generator
                  |  Guard
                  |  Pattern1 `=` Expr
  57. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  58. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  59. def errorPatternTree: Global.Ident
  60. def errorTermTree: Global.Literal
  61. def errorTypeTree: Global.TypeTree
  62. def expectedMsg(token: Parsers.Token): String
  63. def expectedMsgTemplate(exp: String, fnd: String): String
  64. def expr(location: Location): Global.Tree
  65. 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}
                 | `:` `_` `*`
  66. def expr0(location: Location): Global.Tree
  67. def exprSimpleType(): Global.Tree
  68. def exprTypeArgs(): List[Global.Tree]
  69. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  70. def finishBinaryOp(isExpr: Boolean, opinfo: OpInfo, rhs: Global.Tree): Global.Tree
  71. def finishPostfixOp(start: Int, base: List[OpInfo], opinfo: OpInfo): Global.Tree
  72. def followingIsScala3Vararg(): Boolean

    Is current ident a *, and is it followed by a ) or , )?

  73. implicit def fresh: FreshNameCreator
  74. 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
  75. def funDefRest(start: Parsers.Offset, nameOffset: Parsers.Offset, mods: Global.Modifiers, name: Global.Name): Global.Tree
  76. def generator(eqOK: Boolean, allowNestedIf: Boolean = true): List[Global.Tree]

    Generator ::= [`case`] Pattern1 (`<-` | `=`) Expr [Guard]
  77. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  78. def guard(): Global.Tree

    Guard ::= if PostfixExpr
  79. def hardMigrationWarning(offset: Parsers.Offset, depr: => String, migr: => String, since: String): Unit
  80. def hardMigrationWarning(offset: Parsers.Offset, depr: => String, migr: => String, since: String, actions: (String) => List[CodeAction]): Unit
  81. def hardMigrationWarning(offset: Parsers.Offset, msg: String, since: String, actions: List[CodeAction] = Nil): Unit
  82. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  83. def ident(): Global.Name
  84. def ident(skipIt: Boolean): Global.Name

    Assumed (provisionally) to be TermNames.

  85. def identForType(skipIt: Boolean): Global.TypeName
  86. def identForType(): Global.TypeName

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

  87. def identOrMacro(): Global.Name
  88. def implicitClosure(start: Parsers.Offset, location: Location): Global.Tree

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

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

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

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

    ImportSelectors ::= `{` {ImportSelector `,`} (ImportSelector | `_`) `}`
  93. final def inBraces[T](body: => T): T
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  94. final def inBracesOrError[T](body: => T, alt: T): T
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  95. final def inBracesOrNil[T](body: => List[T]): List[T]
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  96. final def inBracesOrUnit[T](body: => Global.Tree): Global.Tree
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  97. final def inBrackets[T](body: => T): T
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  98. final def inGroupers[T](left: Parsers.Token)(body: => T): T

    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.

    Skip trailing comma is pushed down to scanner because this abstract parser doesn't have token info.

    Definition Classes
    ParserCommon
    Annotations
    @inline()
  99. final def inParens[T](body: => T): T
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  100. final def inParensOrError[T](body: => T, alt: T): T
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  101. final def inParensOrNil[T](body: => List[T]): List[T]
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  102. final def inParensOrUnit[T](body: => Global.Tree): Global.Tree
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  103. def isAnnotation: Boolean
  104. def isCaseDefEnd: Boolean
  105. def isDclIntro: Boolean
  106. def isDefIntro: Boolean
  107. def isExprIntro: Boolean
  108. def isExprIntroToken(token: Parsers.Token): Boolean
  109. def isIdent: Boolean
  110. def isIdentExcept(except: Global.Name): Boolean
  111. def isIdentOf(name: Global.Name): Boolean
  112. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  113. def isLiteral: Boolean
  114. def isLiteralToken(token: Parsers.Token): Boolean
  115. def isLocalModifier: Boolean
  116. def isMacro: Boolean
  117. def isModifier: Boolean
  118. def isNumericLit: Boolean
  119. def isRawBar: Boolean
  120. def isRawIdent: Boolean
  121. def isRawStar: Boolean
  122. def isScala3WildcardType: Boolean
  123. def isSoftModifier: Boolean
  124. def isStatSep: Boolean
  125. def isStatSep(token: Parsers.Token): Boolean
  126. def isStatSeqEnd: Boolean
  127. def isTemplateIntro: Boolean
  128. def isTypeIntroToken(token: Parsers.Token): Boolean
  129. def isTypedParam(t: Global.Tree): Boolean
  130. def isUnaryOp: Boolean
  131. def isValidSoftModifier: Boolean

    Is the current token a soft modifier in a position where such a modifier is allowed?

  132. final def isWildcard(t: Global.Tree): Boolean
    Annotations
    @tailrec()
  133. def isWildcardType: Boolean
  134. 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.

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

    SimpleExpr    ::= literal
                    | symbol
                    | null
  136. def localDef(implicitMod: Long): 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) }

  137. def localModifiers(): Global.Modifiers

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

    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()
  139. def makeBinop(isExpr: Boolean, left: Global.Tree, op: Global.TermName, right: Global.Tree, opPos: Global.Position, targs: List[Global.Tree] = Nil): Global.Tree

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

  140. def makeEmptyPackage(start: Parsers.Offset, stats: List[Global.Tree]): Global.PackageDef
  141. def makeFilter(start: Parsers.Offset, tree: Global.Tree): Global.Apply
  142. def makePackaging(start: Parsers.Offset, pkg: Global.Tree, stats: List[Global.Tree]): Global.PackageDef

    Create a tree representing a packaging.

  143. 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()
  144. def makeSafeFunctionType(argtpes: List[Global.Tree], restpe: Global.Tree): Global.Tree

    Create a function Tree.

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

  145. def makeSafeTupleTerm(elems: List[Global.Tree]): Global.Tree

    Create a tuple term Tree.

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

  146. def makeSafeTupleType(elems: List[Global.Tree]): Global.Tree

    Create a tuple type Tree.

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

  147. def migrationWarning(offset: Parsers.Offset, msg: String, since: String, actions: List[CodeAction] = Nil): Unit
  148. def mixinQualifierOpt(): Global.TypeName

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

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

    A succession of argument lists.

  151. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  152. def newLineOpt(): Unit
  153. def newLineOptWhenFollowedBy(token: Parsers.Offset): Unit
  154. def newLineOptWhenFollowing(p: (Parsers.Token) => Boolean): Unit
  155. def newLinesOpt(): Unit
  156. final val noSeq: SeqContextSensitive

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

  157. def nonLocalDefOrDcl: List[Global.Tree]
  158. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  159. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  160. def o2p(offset: Parsers.Offset): Global.Position
  161. def objectDef(start: Parsers.Offset, mods: Global.Modifiers, isPackageObject: Boolean = false): Global.ModuleDef

    ObjectDef       ::= Id ClassTemplateOpt
  162. var opstack: List[OpInfo]
  163. final val outPattern: PatternContextSensitive

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

  164. 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` { ... }
    }
  165. def packageOrPackageObject(start: Parsers.Offset): Global.Tree
  166. def param(owner: Global.Name, implicitmod: Long, caseParam: Boolean): Global.ValDef
  167. 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]
  168. def paramType(repeatedParameterOK: Boolean, useStartAsPosition: Boolean): Global.Tree
  169. def paramType(): Global.Tree

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

    This is the general parse entry point.

  171. def parseRule[T](rule: (Parser.this.type) => T): T
  172. def parseStats(): List[Global.Tree]

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

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

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

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

    Default entry points into some pattern contexts.

  177. var placeholderParams: List[Global.ValDef]

    The parameters introduced by _ "placeholder syntax" in the current expression.

    The parameters introduced by _ "placeholder syntax" in the current expression. Parameters appear in reverse order.

  178. def placeholderTypeBoundary(op: => Global.Tree): Global.Tree
  179. 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.

  180. def postfixExpr(): Global.Tree

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

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

    QualId ::= Id {`.` Id}
  183. def r2p(offset: Parsers.Offset): Global.Position
  184. def r2p(start: Parsers.Offset, mid: Parsers.Offset): Global.Position
  185. def r2p(start: Parsers.Offset, mid: Parsers.Offset, end: Parsers.Offset): Global.Position
  186. def rawIdent(): Global.Name
  187. def readAnnots(part: => Global.Tree): List[Global.Tree]
  188. def reduceExprStack(base: List[OpInfo], top: Global.Tree): Global.Tree
  189. def reducePatternStack(base: List[OpInfo], top: Global.Tree): Global.Tree
  190. def reduceStack(isExpr: Boolean, base: List[OpInfo], top: Global.Tree, opPrecedence: Precedence, leftAssoc: Boolean): Global.Tree
  191. def reduceStack(isExpr: Boolean, base: List[OpInfo], top: Global.Tree): Global.Tree
  192. def refineStat(): List[Global.Tree]
  193. def refineStatSeq(): List[Global.Tree]

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

    Refinement ::= [nl] `{` RefineStat {semi RefineStat} `}`
  195. def resetPackage(): Unit
  196. def scriptBody(): Global.Tree

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

  197. def selector(start: Parsers.Offset, t0: Global.Tree): Global.Tree
  198. final def selectors(start: Parsers.Offset, t: Global.Tree, typeOK: Boolean, dotOffset: Parsers.Offset): Global.Tree
    Annotations
    @tailrec()
  199. def selfInvocation(vparamss: List[List[Global.ValDef]]): Global.Tree

    SelfInvocation  ::= this ArgumentExprs {ArgumentExprs}
  200. final def separatedToken[T](separator: Parsers.Token, part: => T): List[T]

    .

    { `sep` part }

    .

    Definition Classes
    ParserParserCommon
  201. final val seqOK: SeqContextSensitive

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

  202. def seqPatterns(): List[Global.Tree]
  203. def setInPos[T <: Global.Tree](t: T): T
  204. def simpleExpr(): Global.Tree

    SimpleExpr    ::= new (ClassTemplate | TemplateBody)
                    |  BlockExpr
                    |  SimpleExpr1 [`_`]
    SimpleExpr1   ::= literal
                    |  xLiteral
                    |  Path
                    |  `(` [Exprs] `)`
                    |  SimpleExpr `.` Id
                    |  SimpleExpr TypeArgs
                    |  SimpleExpr1 ArgumentExprs
  205. final def simpleExprRest(start: Parsers.Offset, t: Global.Tree, canApply: Boolean): Global.Tree
    Annotations
    @tailrec()
  206. def skip(targetToken: Parsers.Token): Unit
    Attributes
    protected
  207. def stableId(): Global.Tree

    StableId ::= Id
              |  Path `.` Id
              |  [id `.`] super [`[` id `]`]`.` id
  208. def startAnnotType(): Global.Tree
  209. def startInfixType(): Global.Tree
  210. def statSeq(stat: PartialFunction[Parsers.Token, List[Global.Tree]], errorMsg: String = "illegal start of definition"): List[Global.Tree]
  211. def statement(location: Location): Global.Tree
  212. def stripParens(t: Global.Tree): Global.Tree

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

  213. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  214. def syntaxError(offset: Parsers.Offset, msg: String, skipIt: Boolean, actions: List[CodeAction]): Unit
  215. def syntaxError(offset: Parsers.Offset, msg: String, skipIt: Boolean): Unit
  216. def syntaxError(msg: String, skipIt: Boolean, actions: List[CodeAction]): Unit
  217. def syntaxError(msg: String, skipIt: Boolean): Unit
  218. def syntaxErrorOrIncomplete(msg: String, skipIt: Boolean, actions: List[CodeAction] = Nil): Unit
  219. def syntaxErrorOrIncompleteAnd[T](msg: String, skipIt: Boolean, actions: List[CodeAction] = Nil)(and: T): T
  220. 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
  221. def templateBody(isPre: Boolean): (Global.ValDef, List[Global.Tree])

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

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

  222. def templateBodyOpt(parenMeansSyntaxError: Boolean): (Global.ValDef, List[Global.Tree])
  223. def templateOpt(mods: Global.Modifiers, name: Global.Name, constrMods: Global.Modifiers, vparamss: List[List[Global.ValDef]], tstart: Parsers.Offset): Global.Template

    ClassTemplateOpt ::= `extends` ClassTemplate | [[`extends`] TemplateBody]
    TraitTemplateOpt ::= TraitExtends TraitTemplate | [[TraitExtends] TemplateBody]
    TraitExtends     ::= `extends` | `<:` (deprecated)
  224. def templateOrTopStatSeq(): List[Global.Tree]
  225. def templateParents(): List[Global.Tree]

    ClassParents       ::= AnnotType {`(` [Exprs] `)`} {with AnnotType}
    TraitParents       ::= AnnotType {with AnnotType}
  226. def templateStat: PartialFunction[Parsers.Token, List[Global.Tree]]
  227. def templateStatSeq(isPre: Boolean): (Global.ValDef, List[Global.Tree])

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

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

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

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

    TmplDef ::= [case] class ClassDef
              |  [case] object ObjectDef
              |  [override] trait TraitDef
  230. def toString(): String
    Definition Classes
    AnyRef → Any
  231. final def tokenSeparated[T](separator: Parsers.Token, part: => T): List[T]

    .

    part { `sep` part }

    .

    Definition Classes
    ParserParserCommon
  232. def topLevelTmplDef: Global.Tree

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

  233. def topStat: PartialFunction[Parsers.Token, List[Global.Tree]]
  234. def topStatSeq(): List[Global.Tree]

    TopStatSeq ::= TopStat {semi TopStat}
    TopStat ::= Annotations Modifiers TmplDef
              | Packaging
              | package object ObjectDef
              | Import
              |
  235. val treeBuilder: ParserTreeBuilder
  236. def typ(): Global.Tree

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

  237. def typeBounds(): Global.TypeBoundsTree

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

    TypeDef ::= type Id [TypeParamClause] `=` Type
              | FunSig `=` Expr
    TypeDcl ::= type Id [TypeParamClause] TypeBounds
  239. def typeOrInfixType(location: Location): Global.Tree
  240. def typeParamClauseOpt(owner: Global.Name, contextBoundBuf: ListBuffer[Global.Tree], ownerKind: ParamOwner): List[Global.TypeDef]

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

    TypedOpt ::= [`:` Type]
  242. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  243. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  244. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  245. def warning(msg: String, category: WarningCategory, actions: List[CodeAction]): Unit
  246. def warning(msg: String, category: WarningCategory): Unit
  247. def wildImportSelector(): Global.ImportSelector
  248. def wildcardOrIdent(): Global.Name
  249. def wildcardType(start: Parsers.Offset, qmark: Boolean): Global.Ident

    WildcardType ::= `_` TypeBounds
  250. final val xmlSeqOK: SeqContextSensitive

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

  251. def xmlSeqPatterns(): List[Global.Tree]
  252. object InfixMode extends Enumeration

    Modes for infix types.

Deprecated Value Members

  1. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Parser toStringFormat[Parser] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  2. def precedence(operator: Global.Name): Int
    Annotations
    @deprecated
    Deprecated

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

  3. def [B](y: B): (Parser, B)
    Implicit
    This member is added by an implicit conversion from Parser toArrowAssoc[Parser] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from Parsers.ParserCommon

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromParser to any2stringadd[Parser]

Inherited by implicit conversion StringFormat fromParser to StringFormat[Parser]

Inherited by implicit conversion Ensuring fromParser to Ensuring[Parser]

Inherited by implicit conversion ArrowAssoc fromParser to ArrowAssoc[Parser]

Ungrouped