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

Concrete Value Members

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

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

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

    AccessQualifier ::= `[` (Id | this) `]`
  6. def annotTypeRest(t: Global.Tree): Global.Tree
  7. def annotationExpr(): Global.Tree
  8. def annotations(skipNewLines: Boolean): List[Global.Tree]

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

    ArgumentExprs ::= `(` [Exprs] `)`
                    | [nl] BlockExpr
  10. def argumentPatterns(): List[Global.Tree]
  11. val assumedClosingParens: Map[Int, Int]
  12. def atInPos[T <: Global.Tree](t: T): T
  13. def atPos[T <: Global.Tree](pos: Global.Position)(t: T): T
  14. def atPos[T <: Global.Tree](start: Parsers.Offset, point: Parsers.Offset, end: Parsers.Offset)(t: T): T
  15. def atPos[T <: Global.Tree](start: Parsers.Offset, point: Parsers.Offset)(t: T): T
  16. def atPos[T <: Global.Tree](offset: Parsers.Offset)(t: T): T
  17. def block(): Global.Tree

    Block ::= BlockStatSeq
    Note

    Return tree does not carry position.

  18. def blockExpr(): Global.Tree

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

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

    CaseClauses ::= CaseClause {CaseClause}
    CaseClause  ::= case Pattern [Guard] `=>` Block
  24. final def caseSeparated[T](part: => T): List[T]
    Annotations
    @inline()
  25. def checkAssoc(offset: Parsers.Offset, op: Global.Name, leftAssoc: Boolean): Unit
  26. def checkHeadAssoc(leftAssoc: Boolean): Unit
  27. def checkNoEscapingPlaceholders[T](op: => T): T
  28. def checkNotByNameOrVarargs(tpt: Global.Tree): Unit

    Check that type parameter is not by name or repeated.

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

    ClassDef ::= Id [TypeParamClause] ConstrAnnotations
                 [AccessModifier] ClassParamClauses RequiresTypeOpt ClassTemplateOpt
    TraitDef ::= Id [TypeParamClause] RequiresTypeOpt TraitTemplateOpt
  30. final def commaSeparated[T](part: => T): List[T]

    , with the separator fixed to commas.

    tokenSeparated

    , with the separator fixed to commas. tokenSeparated }}}

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

    CompilationUnit ::= {package QualId semi} TopStatSeq
  32. def condExpr(): Global.Tree
  33. def constrBlock(vparamss: List[List[Global.ValDef]]): Global.Tree

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

    ConstrExpr      ::=  SelfInvocation
                      |  ConstrBlock
  35. def constructorAnnotations(): List[Global.Tree]
  36. def convertToParam(tree: Global.Tree): Global.ValDef

    Convert tree to formal parameter.

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

    Convert tree to formal parameter list.

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

    Convert (qual)ident to type identifier.

  39. 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
  40. final def dropAnyBraces[T](body: => T): T
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  41. def ensureEarlyDef(tree: Global.Tree): Global.Tree
  42. def enumerator(isFirst: Boolean, allowNestedIf: Boolean = true): List[Global.Tree]
  43. def enumerators(): List[Global.Tree]

    Enumerators ::= Generator {semi Enumerator}
    Enumerator  ::=  Generator
                  |  Guard
                  |  Pattern1 `=` Expr
  44. def errorPatternTree: Global.Ident
  45. def errorTermTree: Global.Literal
  46. def errorTypeTree: Global.TypeTree
  47. def expectedMsg(token: Parsers.Token): String
  48. def expectedMsgTemplate(exp: String, fnd: String): String
  49. def expr(location: Location): Global.Tree
  50. 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}
                 | `:` `_` `*`
  51. def expr0(location: Location): Global.Tree
  52. def exprSimpleType(): Global.Tree
  53. def exprTypeArgs(): List[Global.Tree]
  54. def finishBinaryOp(isExpr: Boolean, opinfo: OpInfo, rhs: Global.Tree): Global.Tree
  55. def finishPostfixOp(start: Int, base: List[OpInfo], opinfo: OpInfo): Global.Tree
  56. implicit def fresh: FreshNameCreator
  57. 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
  58. def funDefRest(start: Parsers.Offset, nameOffset: Parsers.Offset, mods: Global.Modifiers, name: Global.Name): Global.Tree
  59. def generator(eqOK: Boolean, allowNestedIf: Boolean = true): List[Global.Tree]

    Generator ::= Pattern1 (`<-` | `=`) Expr [Guard]
  60. def guard(): Global.Tree

    Guard ::= if PostfixExpr
  61. def ident(): Global.Name
  62. def ident(skipIt: Boolean): Global.Name

    Assumed (provisionally) to be TermNames.

  63. def identForType(skipIt: Boolean): Global.TypeName
  64. def identForType(): Global.TypeName

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

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

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

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

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

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

    ImportSelectors ::= `{` {ImportSelector `,`} (ImportSelector | `_`) `}`
  71. final def inBraces[T](body: => T): T
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  72. final def inBracesOrError[T](body: => T, alt: T): T
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  73. final def inBracesOrNil[T](body: => List[T]): List[T]
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  74. final def inBracesOrUnit[T](body: => Global.Tree): Global.Tree
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  75. final def inBrackets[T](body: => T): T
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  76. 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()
  77. final def inParens[T](body: => T): T
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  78. final def inParensOrError[T](body: => T, alt: T): T
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  79. final def inParensOrNil[T](body: => List[T]): List[T]
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  80. final def inParensOrUnit[T](body: => Global.Tree): Global.Tree
    Definition Classes
    ParserCommon
    Annotations
    @inline()
  81. def isAnnotation: Boolean
  82. def isCaseDefEnd: Boolean
  83. def isDclIntro: Boolean
  84. def isDefIntro: Boolean
  85. def isExprIntro: Boolean
  86. def isExprIntroToken(token: Parsers.Token): Boolean
  87. def isIdent: Boolean
  88. def isIdentExcept(except: Global.Name): Boolean
  89. def isIdentOf(name: Global.Name): Boolean
  90. def isLiteral: Boolean
  91. def isLiteralToken(token: Parsers.Token): Boolean
  92. def isLocalModifier: Boolean
  93. def isMacro: Boolean
  94. def isModifier: Boolean
  95. def isNumericLit: Boolean
  96. def isRawBar: Boolean
  97. def isRawIdent: Boolean
  98. def isRawStar: Boolean
  99. def isStatSep: Boolean
  100. def isStatSep(token: Parsers.Token): Boolean
  101. def isStatSeqEnd: Boolean
  102. def isTemplateIntro: Boolean
  103. def isTypeIntroToken(token: Parsers.Token): Boolean
  104. def isTypedParam(t: Global.Tree): Boolean
  105. def isUnaryOp: Boolean
  106. final def isWildcard(t: Global.Tree): Boolean
    Annotations
    @tailrec()
  107. 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.

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

    SimpleExpr    ::= literal
                    | symbol
                    | null
  109. 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) }

  110. def localModifiers(): Global.Modifiers

    LocalModifiers ::= {LocalModifier}
    LocalModifier  ::= abstract | final | sealed | implicit | lazy
  111. 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()
  112. 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.

  113. def makeEmptyPackage(start: Parsers.Offset, stats: List[Global.Tree]): Global.PackageDef
  114. def makeFilter(start: Parsers.Offset, tree: Global.Tree): Global.Apply
  115. def makePackaging(start: Parsers.Offset, pkg: Global.Tree, stats: List[Global.Tree]): Global.PackageDef

    Create a tree representing a packaging.

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

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

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

  120. def mixinQualifierOpt(): Global.TypeName

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

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

    A succession of argument lists.

  123. def newLineOpt(): Unit
  124. def newLineOptWhenFollowedBy(token: Parsers.Offset): Unit
  125. def newLineOptWhenFollowing(p: (Parsers.Token) => Boolean): Unit
  126. def newLinesOpt(): Unit
  127. final val noSeq: SeqContextSensitive

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

  128. def nonLocalDefOrDcl: List[Global.Tree]
  129. def o2p(offset: Parsers.Offset): Global.Position
  130. def objectDef(start: Parsers.Offset, mods: Global.Modifiers, isPackageObject: Boolean = false): Global.ModuleDef

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

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

  133. 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` { ... }
    }
  134. def packageOrPackageObject(start: Parsers.Offset): Global.Tree
  135. def param(owner: Global.Name, implicitmod: Long, caseParam: Boolean): Global.ValDef
  136. 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]
  137. def paramType(repeatedParameterOK: Boolean, useStartAsPosition: Boolean): Global.Tree
  138. def paramType(): Global.Tree

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

    This is the general parse entry point.

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

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

  142. def parseStatsOrPackages(): List[Global.Tree]
  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 peekingAhead(tree: => Global.Tree): Global.Tree

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

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

    QualId ::= Id {`.` Id}
  153. def r2p(offset: Parsers.Offset): Global.Position
  154. def r2p(start: Parsers.Offset, mid: Parsers.Offset): Global.Position
  155. def r2p(start: Parsers.Offset, mid: Parsers.Offset, end: Parsers.Offset): Global.Position
  156. def rawIdent(): Global.Name
  157. def readAnnots(part: => Global.Tree): List[Global.Tree]
  158. def reduceExprStack(base: List[OpInfo], top: Global.Tree): Global.Tree
  159. def reducePatternStack(base: List[OpInfo], top: Global.Tree): Global.Tree
  160. def reduceStack(isExpr: Boolean, base: List[OpInfo], top: Global.Tree, opPrecedence: Precedence, leftAssoc: Boolean): Global.Tree
  161. def reduceStack(isExpr: Boolean, base: List[OpInfo], top: Global.Tree): Global.Tree
  162. def refineStat(): List[Global.Tree]
  163. def refineStatSeq(): List[Global.Tree]

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

    Refinement ::= [nl] `{` RefineStat {semi RefineStat} `}`
  165. def resetPackage(): Unit
  166. 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().

  167. def selector(t: Global.Tree): Global.Tree
  168. final def selectors(t: Global.Tree, typeOK: Boolean, dotOffset: Parsers.Offset): Global.Tree
    Annotations
    @tailrec()
  169. def selfInvocation(vparamss: List[List[Global.ValDef]]): Global.Tree

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

    .

    { `sep` part }

    . { sep part } }}}

    Definition Classes
    ParserParserCommon
  171. final val seqOK: SeqContextSensitive

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

  172. def seqPatterns(): List[Global.Tree]
  173. def setInPos[T <: Global.Tree](t: T): T
  174. def simpleExpr(): Global.Tree

    SimpleExpr    ::= new (ClassTemplate | TemplateBody)
                    |  BlockExpr
                    |  SimpleExpr1 [`_`]
    SimpleExpr1   ::= literal
                    |  xLiteral
                    |  Path
                    |  `(` [Exprs] `)`
                    |  SimpleExpr `.` Id
                    |  SimpleExpr TypeArgs
                    |  SimpleExpr1 ArgumentExprs
  175. final def simpleExprRest(t: Global.Tree, canApply: Boolean): Global.Tree
    Annotations
    @tailrec()
  176. def stableId(): Global.Tree

    StableId ::= Id
              |  Path `.` Id
              |  [id `.`] super [`[` id `]`]`.` id
  177. def startAnnotType(): Global.Tree
  178. def startInfixType(): Global.Tree
  179. def statSeq(stat: PartialFunction[Parsers.Token, List[Global.Tree]], errorMsg: String = "illegal start of definition"): List[Global.Tree]
  180. def statement(location: Location): Global.Tree
  181. def stripParens(t: Global.Tree): Global.Tree

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

  182. def syntaxError(offset: Parsers.Offset, msg: String, skipIt: Boolean): Unit
  183. def syntaxError(msg: String, skipIt: Boolean): Unit
  184. def syntaxErrorOrIncomplete(msg: String, skipIt: Boolean): Unit
  185. def syntaxErrorOrIncompleteAnd[T](msg: String, skipIt: Boolean)(and: T): T
  186. 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
  187. def templateBody(isPre: Boolean): (Global.ValDef, List[Global.Tree])

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

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

  188. def templateBodyOpt(parenMeansSyntaxError: Boolean): (Global.ValDef, List[Global.Tree])
  189. 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)
  190. def templateOrTopStatSeq(): List[Global.Tree]
  191. def templateParents(): List[Global.Tree]

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

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

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

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

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

    TmplDef ::= [case] class ClassDef
              |  [case] object ObjectDef
              |  [override] trait TraitDef
  196. final def tokenSeparated[T](separator: Parsers.Token, part: => T): List[T]

    .

    part { `sep` part }

    . part { sep part } }}}

    Definition Classes
    ParserParserCommon
  197. def topLevelTmplDef: Global.Tree

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

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

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

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

  202. def typeBounds(): Global.TypeBoundsTree

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

    TypeDef ::= type Id [TypeParamClause] `=` Type
              | FunSig `=` Expr
    TypeDcl ::= type Id [TypeParamClause] TypeBounds
  204. def typeOrInfixType(location: Location): Global.Tree
  205. 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}
  206. def typedOpt(): Global.Tree

    TypedOpt ::= [`:` Type]
  207. def warning(msg: String, category: WarningCategory): Unit
  208. def wildImportSelector(): Global.ImportSelector
  209. def wildcardOrIdent(): Global.Name
  210. def wildcardType(start: Parsers.Offset): Global.Ident

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

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

  212. def xmlSeqPatterns(): List[Global.Tree]
  213. object InfixMode extends Enumeration

    Modes for infix types.

Deprecated Value Members

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

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