abstract class Parser extends ParserCommon
- Alphabetic
- By Inheritance
- Parser
- ParserCommon
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Parser()
Type Members
- class ParserTreeBuilder extends TreeBuilder
- 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.
- 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
- abstract def deprecationWarning(off: Parsers.Offset, msg: String, since: String): Unit
- Definition Classes
- ParserCommon
- abstract val in: Parsers.Scanner
- Definition Classes
- Parser → ParserCommon
- abstract def incompleteInputError(msg: String): Unit
- abstract def parseStartRule: () => Global.Tree
- abstract def source: SourceFile
- abstract def syntaxError(offset: Parsers.Offset, msg: String): Unit
- abstract def unit: Global.CompilationUnit
- abstract def warning(offset: Parsers.Offset, msg: String, category: WarningCategory): Unit
- abstract def xmlLiteral(): Global.Tree
- abstract def xmlLiteralPattern(): Global.Tree
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Parser, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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
- Parser → ParserCommon
- def acceptStatSep(): Unit
semi = nl {nl} | `;` nl = `\n` // where allowed
- def acceptStatSepOpt(): Unit
- def accessModifierOpt(): Global.Modifiers
AccessModifier ::= (private | protected) [AccessQualifier]
- def accessQualifierOpt(mods: Global.Modifiers): Global.Modifiers
AccessQualifier ::= `[` (Id | this) `]`
- def annotTypeRest(t: Global.Tree): Global.Tree
- def annotationExpr(): Global.Tree
- def annotations(skipNewLines: Boolean): List[Global.Tree]
Annotations ::= {`@` SimpleType {ArgumentExprs}} ConstrAnnotations ::= {`@` SimpleType ArgumentExprs}
- def argumentExprs(): List[Global.Tree]
ArgumentExprs ::= `(` [Exprs] `)` | [nl] BlockExpr
- def argumentPatterns(): List[Global.Tree]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val assumedClosingParens: Map[Int, Int]
- def atInPos[T <: Global.Tree](t: T): T
- def atPos[T <: Global.Tree](pos: Global.Position)(t: T): T
- def atPos[T <: Global.Tree](start: Parsers.Offset, point: Parsers.Offset, end: Parsers.Offset)(t: T): T
- def atPos[T <: Global.Tree](start: Parsers.Offset, point: Parsers.Offset)(t: T): T
- def atPos[T <: Global.Tree](offset: Parsers.Offset)(t: T): T
- def block(): Global.Tree
Block ::= BlockStatSeq
- Note
Return tree does not carry position.
- def blockExpr(): Global.Tree
BlockExpr ::= `{` (CaseClauses | Block) `}`
- def blockStatSeq(): List[Global.Tree]
BlockStatSeq ::= { BlockStat semi } [ResultExpr] BlockStat ::= Import | Annotations [implicit] [lazy] Def | Annotations LocalModifiers TmplDef | Expr1 |
- def bound(tok: Parsers.Token): Global.Tree
- def caseBlock(): Global.Tree
- def caseClause(): Global.CaseDef
- def caseClauses(): List[Global.CaseDef]
CaseClauses ::= CaseClause {CaseClause} CaseClause ::= case Pattern [Guard] `=>` Block
- final def caseSeparated[T](part: => T): List[T]
- Annotations
- @inline()
- def checkAssoc(offset: Parsers.Offset, op: Global.Name, leftAssoc: Boolean): Unit
- def checkHeadAssoc(leftAssoc: Boolean): Unit
- def checkKeywordDefinition(): Unit
- def checkNoEscapingPlaceholders[T](op: => T): T
- def checkNotByNameOrVarargs(tpt: Global.Tree): Unit
Check that type parameter is not by name or repeated.
- def checkQMarkDefinition(): Unit
- def checkQMarkUsage(): Unit
- def classDef(start: Parsers.Offset, mods: Global.Modifiers): Global.ClassDef
ClassDef ::= Id [TypeParamClause] ConstrAnnotations [AccessModifier] ClassParamClauses RequiresTypeOpt ClassTemplateOpt TraitDef ::= Id [TypeParamClause] RequiresTypeOpt TraitTemplateOpt
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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()
- def compilationUnit(): Global.PackageDef
CompilationUnit ::= {package QualId semi} TopStatSeq
- def condExpr(): Global.Tree
- def constrBlock(vparamss: List[List[Global.ValDef]]): Global.Tree
ConstrBlock ::= `{` SelfInvocation {semi BlockStat} `}`
- def constrExpr(vparamss: List[List[Global.ValDef]]): Global.Tree
ConstrExpr ::= SelfInvocation | ConstrBlock
- def constructorAnnotations(): List[Global.Tree]
- def convertToParam(tree: Global.Tree): Global.ValDef
Convert tree to formal parameter.
- def convertToParams(tree: Global.Tree): List[Global.ValDef]
Convert tree to formal parameter list.
- def convertToTypeId(tree: Global.Tree): Global.Tree
Convert (qual)ident to type identifier.
- 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
- final def dropAnyBraces[T](body: => T): T
- Definition Classes
- ParserCommon
- Annotations
- @inline()
- def ensureEarlyDef(tree: Global.Tree): Global.Tree
- def ensuring(cond: (Parser) => Boolean, msg: => Any): Parser
- def ensuring(cond: (Parser) => Boolean): Parser
- def ensuring(cond: Boolean, msg: => Any): Parser
- def ensuring(cond: Boolean): Parser
- def enumerator(isFirst: Boolean, allowNestedIf: Boolean = true): List[Global.Tree]
- def enumerators(): List[Global.Tree]
Enumerators ::= Generator {semi Enumerator} Enumerator ::= Generator | Guard | Pattern1 `=` Expr
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def errorPatternTree: Global.Ident
- def errorTermTree: Global.Literal
- def errorTypeTree: Global.TypeTree
- def expectedMsg(token: Parsers.Token): String
- def expectedMsgTemplate(exp: String, fnd: String): String
- def expr(location: Location): Global.Tree
- 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} | `:` `_` `*`
- def expr0(location: Location): Global.Tree
- def exprSimpleType(): Global.Tree
- def exprTypeArgs(): List[Global.Tree]
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def finishBinaryOp(isExpr: Boolean, opinfo: OpInfo, rhs: Global.Tree): Global.Tree
- def finishPostfixOp(start: Int, base: List[OpInfo], opinfo: OpInfo): Global.Tree
- def followingIsScala3Vararg(): Boolean
Is current ident a
*
, and is it followed by a)
or, )
? - implicit def fresh: FreshNameCreator
- 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
- def funDefRest(start: Parsers.Offset, nameOffset: Parsers.Offset, mods: Global.Modifiers, name: Global.Name): Global.Tree
- def generator(eqOK: Boolean, allowNestedIf: Boolean = true): List[Global.Tree]
Generator ::= [`case`] Pattern1 (`<-` | `=`) Expr [Guard]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def guard(): Global.Tree
Guard ::= if PostfixExpr
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def ident(): Global.Name
- def ident(skipIt: Boolean): Global.Name
Assumed (provisionally) to be TermNames.
- def identForType(skipIt: Boolean): Global.TypeName
- def identForType(): Global.TypeName
For when it's known already to be a type name.
- def identOrMacro(): Global.Name
- def implicitClosure(start: Parsers.Offset, location: Location): Global.Tree
Expr ::= implicit Id `=>` Expr
- def importClause(): List[Global.Tree]
Import ::= import ImportExpr {`,` ImportExpr}
- def importExpr(): Global.Tree
ImportExpr ::= StableId `.` (Id | `_` | ImportSelectors)
- def importSelector(): Global.ImportSelector
ImportSelector ::= Id [`=>` Id | `=>` `_`]
- def importSelectors(): List[Global.ImportSelector]
ImportSelectors ::= `{` {ImportSelector `,`} (ImportSelector | `_`) `}`
- final def inBraces[T](body: => T): T
- Definition Classes
- ParserCommon
- Annotations
- @inline()
- final def inBracesOrError[T](body: => T, alt: T): T
- Definition Classes
- ParserCommon
- Annotations
- @inline()
- final def inBracesOrNil[T](body: => List[T]): List[T]
- Definition Classes
- ParserCommon
- Annotations
- @inline()
- final def inBracesOrUnit[T](body: => Global.Tree): Global.Tree
- Definition Classes
- ParserCommon
- Annotations
- @inline()
- final def inBrackets[T](body: => T): T
- Definition Classes
- ParserCommon
- Annotations
- @inline()
- 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()
- final def inParens[T](body: => T): T
- Definition Classes
- ParserCommon
- Annotations
- @inline()
- final def inParensOrError[T](body: => T, alt: T): T
- Definition Classes
- ParserCommon
- Annotations
- @inline()
- final def inParensOrNil[T](body: => List[T]): List[T]
- Definition Classes
- ParserCommon
- Annotations
- @inline()
- final def inParensOrUnit[T](body: => Global.Tree): Global.Tree
- Definition Classes
- ParserCommon
- Annotations
- @inline()
- def isAnnotation: Boolean
- def isCaseDefEnd: Boolean
- def isDclIntro: Boolean
- def isDefIntro: Boolean
- def isExprIntro: Boolean
- def isExprIntroToken(token: Parsers.Token): Boolean
- def isIdent: Boolean
- def isIdentExcept(except: Global.Name): Boolean
- def isIdentOf(name: Global.Name): Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isLiteral: Boolean
- def isLiteralToken(token: Parsers.Token): Boolean
- def isLocalModifier: Boolean
- def isMacro: Boolean
- def isModifier: Boolean
- def isNumericLit: Boolean
- def isRawBar: Boolean
- def isRawIdent: Boolean
- def isRawStar: Boolean
- def isScala3WildcardType: Boolean
- def isSoftModifier: Boolean
- def isStatSep: Boolean
- def isStatSep(token: Parsers.Token): Boolean
- def isStatSeqEnd: Boolean
- def isTemplateIntro: Boolean
- def isTypeIntroToken(token: Parsers.Token): Boolean
- def isTypedParam(t: Global.Tree): Boolean
- def isUnaryOp: Boolean
- def isValidSoftModifier: Boolean
Is the current token a soft modifier in a position where such a modifier is allowed?
- final def isWildcard(t: Global.Tree): Boolean
- Annotations
- @tailrec()
- def isWildcardType: Boolean
- 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.
- def literal(isNegated: Boolean = false, inPattern: Boolean = false, start: Parsers.Offset = in.offset): Global.Tree
SimpleExpr ::= literal | symbol | null
- 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) }
- def localModifiers(): Global.Modifiers
LocalModifiers ::= {LocalModifier} LocalModifier ::= abstract | final | sealed | implicit | lazy
- 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()
- 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.
- def makeEmptyPackage(start: Parsers.Offset, stats: List[Global.Tree]): Global.PackageDef
- def makeFilter(start: Parsers.Offset, tree: Global.Tree): Global.Apply
- def makePackaging(start: Parsers.Offset, pkg: Global.Tree, stats: List[Global.Tree]): Global.PackageDef
Create a tree representing a packaging.
- 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()
- 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.
- 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.
- 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.
- def mixinQualifierOpt(): Global.TypeName
MixinQualifier ::= `[` Id `]`
- def modifiers(): Global.Modifiers
Modifiers ::= {Modifier} Modifier ::= LocalModifier | AccessModifier | override
- def multipleArgumentExprs(): List[List[Global.Tree]]
A succession of argument lists.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newLineOpt(): Unit
- def newLineOptWhenFollowedBy(token: Parsers.Offset): Unit
- def newLineOptWhenFollowing(p: (Parsers.Token) => Boolean): Unit
- def newLinesOpt(): Unit
- final val noSeq: SeqContextSensitive
The implementation for parsing inside of patterns at points where sequences are disallowed.
- def nonLocalDefOrDcl: List[Global.Tree]
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def o2p(offset: Parsers.Offset): Global.Position
- def objectDef(start: Parsers.Offset, mods: Global.Modifiers, isPackageObject: Boolean = false): Global.ModuleDef
ObjectDef ::= Id ClassTemplateOpt
- var opstack: List[OpInfo]
- final val outPattern: PatternContextSensitive
The implementation of the context sensitive methods for parsing outside of patterns.
- 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` { ... } }
- def packageOrPackageObject(start: Parsers.Offset): Global.Tree
- def param(owner: Global.Name, implicitmod: Long, caseParam: Boolean): Global.ValDef
- 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]
- def paramType(repeatedParameterOK: Boolean, useStartAsPosition: Boolean): Global.Tree
- def paramType(): Global.Tree
ParamType ::= Type | `=>` Type | Type `*`
- def parse(): Global.Tree
This is the general parse entry point.
- def parseRule[T](rule: (Parser.this.type) => T): T
- def parseStats(): List[Global.Tree]
These are alternative entry points for repl, script runner, toolbox and parsing in macros.
- def parseStatsOrPackages(): List[Global.Tree]
- def patDefOrDcl(pos: Int, mods: Global.Modifiers): List[Global.Tree]
PatDef ::= Pattern2 {`,` Pattern2} [`:` Type] `=` Expr ValDcl ::= Id {`,` Id} `:` Type VarDef ::= PatDef | Id {`,` Id} `:` Type `=` `_`
- def path(thisOK: Boolean, typeOK: Boolean): Global.Tree
Path ::= StableId | [Ident `.`] this AnnotType ::= Path [`.` type]
- def pattern(): Global.Tree
Default entry points into some pattern contexts.
- 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. - def placeholderTypeBoundary(op: => Global.Tree): Global.Tree
- 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. - def postfixExpr(): Global.Tree
PostfixExpr ::= InfixExpr [Id [nl]] InfixExpr ::= PrefixExpr | InfixExpr Id [nl] InfixExpr
- def prefixExpr(): Global.Tree
PrefixExpr ::= [`-` | `+` | `~` | `!`] SimpleExpr
- def qualId(): Global.Tree
QualId ::= Id {`.` Id}
- def r2p(offset: Parsers.Offset): Global.Position
- def r2p(start: Parsers.Offset, mid: Parsers.Offset): Global.Position
- def r2p(start: Parsers.Offset, mid: Parsers.Offset, end: Parsers.Offset): Global.Position
- def rawIdent(): Global.Name
- def readAnnots(part: => Global.Tree): List[Global.Tree]
- def reduceExprStack(base: List[OpInfo], top: Global.Tree): Global.Tree
- def reducePatternStack(base: List[OpInfo], top: Global.Tree): Global.Tree
- def reduceStack(isExpr: Boolean, base: List[OpInfo], top: Global.Tree, opPrecedence: Precedence, leftAssoc: Boolean): Global.Tree
- def reduceStack(isExpr: Boolean, base: List[OpInfo], top: Global.Tree): Global.Tree
- def refineStat(): List[Global.Tree]
- def refineStatSeq(): List[Global.Tree]
RefineStatSeq ::= RefineStat {semi RefineStat} RefineStat ::= Dcl | type TypeDef |
- def refinement(): List[Global.Tree]
Refinement ::= [nl] `{` RefineStat {semi RefineStat} `}`
- def resetPackage(): Unit
- 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().
- def selector(t0: Global.Tree): Global.Tree
- final def selectors(t: Global.Tree, typeOK: Boolean, dotOffset: Parsers.Offset): Global.Tree
- Annotations
- @tailrec()
- def selfInvocation(vparamss: List[List[Global.ValDef]]): Global.Tree
SelfInvocation ::= this ArgumentExprs {ArgumentExprs}
- final def separatedToken[T](separator: Parsers.Token, part: => T): List[T]
.
{ `sep` part }
. {
sep
part } }}}- Definition Classes
- Parser → ParserCommon
- final val seqOK: SeqContextSensitive
The implementation for parsing inside of patterns at points where sequences are allowed.
- def seqPatterns(): List[Global.Tree]
- def setInPos[T <: Global.Tree](t: T): T
- def simpleExpr(): Global.Tree
SimpleExpr ::= new (ClassTemplate | TemplateBody) | BlockExpr | SimpleExpr1 [`_`] SimpleExpr1 ::= literal | xLiteral | Path | `(` [Exprs] `)` | SimpleExpr `.` Id | SimpleExpr TypeArgs | SimpleExpr1 ArgumentExprs
- final def simpleExprRest(t: Global.Tree, canApply: Boolean): Global.Tree
- Annotations
- @tailrec()
- def skip(targetToken: Parsers.Token): Unit
- Attributes
- protected
- def stableId(): Global.Tree
StableId ::= Id | Path `.` Id | [id `.`] super [`[` id `]`]`.` id
- def startAnnotType(): Global.Tree
- def startInfixType(): Global.Tree
- def statSeq(stat: PartialFunction[Parsers.Token, List[Global.Tree]], errorMsg: String = "illegal start of definition"): List[Global.Tree]
- def statement(location: Location): Global.Tree
- def stripParens(t: Global.Tree): Global.Tree
Strip the artificial
Parens
node to create a tuple term Tree. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def syntaxError(offset: Parsers.Offset, msg: String, skipIt: Boolean): Unit
- def syntaxError(msg: String, skipIt: Boolean): Unit
- def syntaxErrorOrIncomplete(msg: String, skipIt: Boolean): Unit
- def syntaxErrorOrIncompleteAnd[T](msg: String, skipIt: Boolean)(and: T): T
- 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
- def templateBody(isPre: Boolean): (Global.ValDef, List[Global.Tree])
TemplateBody ::= [nl] `{` TemplateStatSeq `}`
- isPre
specifies whether in early initializer (true) or not (false)
- def templateBodyOpt(parenMeansSyntaxError: Boolean): (Global.ValDef, List[Global.Tree])
- 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)
- def templateOrTopStatSeq(): List[Global.Tree]
- def templateParents(): List[Global.Tree]
ClassParents ::= AnnotType {`(` [Exprs] `)`} {with AnnotType} TraitParents ::= AnnotType {with AnnotType}
- def templateStat: PartialFunction[Parsers.Token, List[Global.Tree]]
- def templateStatSeq(isPre: Boolean): (Global.ValDef, List[Global.Tree])
TemplateStatSeq ::= [id [`:` Type] `=>`] TemplateStats
- isPre
specifies whether in early initializer (true) or not (false)
- def templateStats(): List[Global.Tree]
TemplateStats ::= TemplateStat {semi TemplateStat} TemplateStat ::= Import | Annotations Modifiers Def | Annotations Modifiers Dcl | Expr1 | super ArgumentExprs {ArgumentExprs} |
- def tmplDef(pos: Parsers.Offset, mods: Global.Modifiers): Global.Tree
TmplDef ::= [case] class ClassDef | [case] object ObjectDef | [override] trait TraitDef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def tokenSeparated[T](separator: Parsers.Token, part: => T): List[T]
.
part { `sep` part }
. part {
sep
part } }}}- Definition Classes
- Parser → ParserCommon
- def topLevelTmplDef: Global.Tree
Hook for IDE, for top-level classes/objects.
- def topStat: PartialFunction[Parsers.Token, List[Global.Tree]]
- def topStatSeq(): List[Global.Tree]
TopStatSeq ::= TopStat {semi TopStat} TopStat ::= Annotations Modifiers TmplDef | Packaging | package object ObjectDef | Import |
- val treeBuilder: ParserTreeBuilder
- def typ(): Global.Tree
These are default entry points into the pattern context sensitive methods: they are all initiated from non-pattern context.
- def typeBounds(): Global.TypeBoundsTree
TypeBounds ::= [`>:` Type] [`<:` Type]
- def typeDefOrDcl(start: Parsers.Offset, mods: Global.Modifiers): Global.Tree
TypeDef ::= type Id [TypeParamClause] `=` Type | FunSig `=` Expr TypeDcl ::= type Id [TypeParamClause] TypeBounds
- def typeOrInfixType(location: Location): Global.Tree
- 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}
- def typedOpt(): Global.Tree
TypedOpt ::= [`:` Type]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def warning(msg: String, category: WarningCategory): Unit
- def wildImportSelector(): Global.ImportSelector
- def wildcardOrIdent(): Global.Name
- def wildcardType(start: Parsers.Offset, qmark: Boolean): Global.Ident
WildcardType ::= `_` TypeBounds
- final val xmlSeqOK: SeqContextSensitive
For use from xml pattern, where sequence is allowed and encouraged.
- def xmlSeqPatterns(): List[Global.Tree]
- object InfixMode extends Enumeration
Modes for infix types.
Deprecated Value Members
- 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 ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def precedence(operator: Global.Name): Int
- Annotations
- @deprecated
- Deprecated
(Since version 2.11.0) Use
scala.reflect.internal.Precedence
- 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.
The Scala compiler and reflection APIs.