Dotty Documentation

0.15.0-bin-SNAPSHOT

class Parser
extends ParserCommon

[-] Constructors

Parser ( source: SourceFile )
Parser ( implicit ctx: Context )

[-] Members

[+] object symbXMLBuilder
[+] type ImportConstr = (Boolean, Tree, List [ Tree ]) => Tree
[+] val argumentExpr : () => Tree
[+] val caseClause : () => CaseDef

CaseClause ::= ‘case’ Pattern [Guard] =>' Block ImplicitCaseClause ::= ‘case’ PatVar [Ascription] [Guard]=>' Block

[+] val closureMods : BitSet

ClosureMods ::= { ‘implicit’ | ‘erased’ | ‘given’} FunTypeMods ::= { ‘erased’ | ‘given’}

[+] val constrApp : () => Tree

ConstrApp ::= SimpleType {ParArgumentExprs}

[+] private implicit val ctx : Context
[+] val exprInParens : () => Tree

Expr ::= [ClosureMods] FunParams =>' Expr | Expr1 FunParams ::= Bindings | id | _' ExprInParens ::= PostfixExpr:' Type | Expr BlockResult ::= [ClosureMods] FunParams =>' Block | Expr1 Expr1 ::= [‘inline’] if'(' Expr )' {nl} Expr [[semi] else Expr] | [‘inline’]if' Expr then' Expr [[semi] else Expr] |while' (' Expr)' {nl} Expr | while' Exprdo' Expr | do' Expr [semi]while' Expr | try' Expr Catches [finally' Expr] | try' Expr [finally' Expr] | throw' Expr |return' [Expr] | ForExpr | [SimpleExpr .'] id=' Expr | SimpleExpr1 ArgumentExprs =' Expr | PostfixExpr [Ascription] | [‘inline’] PostfixExprmatch' {' CaseClauses}' | implicit'match' {' ImplicitCaseClauses}' Bindings ::= (' [Binding {,' Binding}] )' Binding ::= (id |_') [:' Type] Ascription ::=:' CompoundType | :' Annotation {Annotation} |:' _'*'

[+] val funArgType : () => Tree

FunArgType ::= Type | `=>' Type

[+] val funTypeMods : BitSet
[+] val handleSingletonType : Tree => Tree
[+] private val id : Tree => Tree
[+] val in : Scanner
[+] private var inClassConstrAnnots : Boolean

A flag indicating we are parsing in the annotations of a primary class constructor

[+] private var inEnum : Boolean
[+] private var inFunReturnType : Boolean
[+] private var lastStatOffset : Int

The offset of the last time when a statement on a new line was definitely encountered in the current scope or an outer scope.

[+] var opStack : List [ OpInfo ]
[+] val openParens : ParensCounters
[+] val pattern : () => Tree

Pattern ::= Pattern1 { `|' Pattern1 }

[+] val pattern2 : () => Tree

Pattern2 ::= [id `@'] InfixPattern

[+] var placeholderParams : List [ ValDef ]

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

[+] val prefixExpr : () => Tree

PrefixExpr ::= [-' |+' | ~' |!'] SimpleExpr

[+] val refinedType : () => Tree

RefinedType ::= WithType {Annotation | [nl] Refinement}

[+] val simplePattern : () => Tree

SimplePattern ::= PatVar | Literal | Quoted | XmlPattern | (' [Patterns])' | SimplePattern1 [TypeArgs] [ArgumentPatterns] SimplePattern1 ::= Path | SimplePattern1 .' id PatVar ::= id |_'

[+] private val source : SourceFile
[+] private var staged : Int
[+] val typeCaseClause : () => CaseDef

TypeCaseClause ::= ‘case’ InfixType ‘=>’ Type [nl]

[+] lazy val xmlp : MarkupParser

the markup parser

[+] def accept ( token: Int ) : Int

Consume one token of the specified type, or signal an error if it is not there.

[+] def acceptStatSep ( ) : Unit

semi = nl {nl} | ;' nl =\n' // where allowed

[+] def acceptStatSepUnlessAtEnd ( altEnd: Token ) : Unit
[+] def acceptStatSepUnlessAtEnd$default$1 : Int
[+] def accessQualifierOpt ( mods: Modifiers ) : Modifiers

AccessQualifier ::= "[" (id | this) "]"

[+] def addFlag ( mods: Modifiers , flag: FlagSet ) : Modifiers
[+] def addMod ( mods: Modifiers , mod: Mod ) : Modifiers

Always add the syntactic mod, but check and conditionally add semantic mod.flags

[+] private def addModifier ( mods: Modifiers ) : Modifiers
[+] def adjustStart ( start: Offset ) ( tree: Tree ) : Tree

Adjust start of annotation or constructor to offset of preceding @ or new

[+] def annot ( ) : Tree

Annotation ::= `@' SimpleType {ParArgumentExprs}

[+] def annotType ( ) : Tree

AnnotType ::= SimpleType {Annotation}

[+] def annotTypeRest ( t: Tree ) : Tree
[+] def annotations ( skipNewLines: Boolean ) : List [ Tree ]
[+] def annotations$default$1 : Boolean
[+] def annotsAsMods ( skipNewLines: Boolean ) : Modifiers
[+] def annotsAsMods$default$1 : Boolean
[+] def argTypes ( namedOK: Boolean , wildOK: Boolean ) : List [ Tree ]

ArgTypes ::= Type {,' Type} | NamedTypeArg {,' NamedTypeArg} NamedTypeArg ::= id `=' Type

[+] def argumentExprs ( ) : List [ Tree ]

ArgumentExprs ::= ParArgumentExprs | [nl] BlockExpr

[+] def argumentExprss ( fn: Tree ) : Tree

ArgumentExprss ::= {ArgumentExprs}

[+] def argumentPatterns ( ) : List [ Tree ]

ArgumentPatterns ::= (' [Patterns])' | (' [Patterns,'] Pattern2 :'_' `*' ')

[+] def ascription ( t: Tree , location: Value ) : Tree
[+] def binding ( mods: Modifiers ) : Tree

Binding ::= (id | _') [:' Type]

[+] def bindingName ( ) : TermName
[+] def block ( ) : Tree

Block ::= BlockStatSeq

[+] def blockExpr ( ) : Tree

BlockExpr ::= {' BlockExprContents}' BlockExprContents ::= CaseClauses | Block

[+] def blockStatSeq ( ) : List [ Tree ]

BlockStatSeq ::= { BlockStat semi } [ResultExpr] BlockStat ::= Import | Annotations [implicit] [lazy] Def | Annotations LocalModifiers TmplDef | Expr1 |

[+] private def bound ( tok: Int ) : Tree
[+] def caseClauses ( clause: () => CaseDef ) : List [ CaseDef ]

CaseClauses ::= CaseClause {CaseClause} ImplicitCaseClauses ::= ImplicitCaseClause {ImplicitCaseClause} TypeCaseClauses ::= TypeCaseClause {TypeCaseClause}

[+] def caseTemplate ( constr: DefDef ) : Template

[`extends' ConstrApps]

[+] def checkAssoc ( offset: Token , op1: Name , op2: Name , op2LeftAssoc: Boolean ) : Unit
[+] def checkNoEscapingPlaceholders ( op: => T ) : T
[+] def classConstr ( isCaseClass: Boolean ) : DefDef

ClassConstr ::= [ClsTypeParamClause] [ConstrMods] ClsParamClauses

[+] def classConstr$default$1 : Boolean

ClassConstr ::= [ClsTypeParamClause] [ConstrMods] ClsParamClauses

[+] def classDef ( start: Offset , mods: Modifiers ) : TypeDef

ClassDef ::= id ClassConstr TemplateOpt

[+] def classDefRest ( start: Offset , mods: Modifiers , name: TypeName ) : TypeDef
[+] def closureRest ( start: Int , location: Value , params: List [ Tree ] ) : Tree
[+] def commaSeparated ( part: () => T ) : List [ T ]
[+] private def compatible ( flags1: FlagSet , flags2: FlagSet ) : Boolean
[+] def compilationUnit ( ) : Tree

CompilationUnit ::= {package QualId semi} TopStatSeq

[+] def condExpr ( altToken: Token ) : Tree
[+] def constrApps ( ) : List [ Tree ]

ConstrApps ::= ConstrApp {‘with’ ConstrApp} (to be deprecated in 3.1) | ConstrApp {‘,’ ConstrApp}

[+] def constrBlock ( ) : Tree

ConstrBlock ::= {' SelfInvocation {semi BlockStat}}'

[+] def constrExpr ( ) : Tree

ConstrExpr ::= SelfInvocation | ConstrBlock

[+] def constrModsOpt ( ) : Modifiers

ConstrMods ::= {Annotation} [AccessModifier]

[+] def contextBounds ( pname: TypeName ) : List [ Tree ]
[+] def convertToParam ( tree: Tree , expected: String ) : ValDef

Convert tree to formal parameter

[+] def convertToParam$default$2 : String

Convert tree to formal parameter

[+] def convertToParams ( tree: Tree ) : List [ ValDef ]

Convert tree to formal parameter list

[+] def convertToTypeId ( tree: Tree ) : Tree

Convert (qual)ident to type identifier

[+] def defAnnotsMods ( allowed: BitSet ) : Modifiers
[+] def defDefOrDcl ( start: Offset , mods: Modifiers ) : Tree

DefDef ::= DefSig [(‘:’ | ‘<:’) Type] ‘=’ Expr | this ParamClause ParamClauses =' ConstrExpr DefDcl ::= DefSig:' Type DefSig ::= ‘(’ DefParam ‘)’ [nl] id [DefTypeParamClause] ParamClauses

[+] def defOrDcl ( start: Int , mods: Modifiers ) : Tree

Def ::= val PatDef | var VarDef | def DefDef | type {nl} TypeDcl | TmplDef Dcl ::= val ValDcl | var ValDcl | def DefDcl | type {nl} TypeDcl EnumCase ::= case' (id ClassConstr [extends' ConstrApps]] | ids)

[+] def deprecationWarning ( msg: => Message , offset: Int ) : Unit
[+] def deprecationWarning$default$2 : Offset
[+] def dotSelectors ( t: Tree , finish: Tree => Tree ) : Tree

DotSelectors ::= { `.' id }

Accept .' separated identifiers acting as a selectors on given treet`.

[+] def dotSelectors$default$2 : Tree => Tree

DotSelectors ::= { `.' id }

Accept .' separated identifiers acting as a selectors on given treet`.

[+] def enclosed ( tok: Token , body: => T ) : T
[+] def enumCase ( start: Offset , mods: Modifiers ) : DefTree

EnumCase = case' (id ClassConstr [extends' ConstrApps] | ids)

[+] def enumDef ( start: Offset , mods: Modifiers , enumMod: Mod ) : TypeDef

EnumDef ::= id ClassConstr InheritClauses EnumBody

[+] def enumerator ( ) : Tree

Enumerator ::= Generator | Guard | Pattern1 `=' Expr

[+] def enumerators ( ) : List [ Tree ]

Enumerators ::= Generator {semi Enumerator | Guard}

[+] def enumeratorsRest ( ) : List [ Tree ]
[+] def equalsExpr ( ) : Tree

EqualsExpr ::= `=' Expr

[+] def errorOrMigrationWarning ( msg: => Message , offset: Int ) : Unit
[+] def errorOrMigrationWarning$default$2 : Offset
[+] def errorTermTree : Literal
[+] def expr ( ) : Tree
[+] def expr ( location: Value ) : Tree
[+] def expr1 ( location: Value ) : Tree
[+] def expr1$default$1 : Value
[+] def expr1Rest ( t: Tree , location: Value ) : Tree
[+] def exprsInParensOpt ( ) : List [ Tree ]

ExprsInParens ::= ExprInParens {`,' ExprInParens}

[+] def finalizeDef ( md: MemberDef , mods: Modifiers , start: Int ) : ThisTree [ Untyped ]
[+] def forExpr ( ) : Tree

ForExpr ::= for' ((' Enumerators )' |{' Enumerators }') {nl} [yield'] Expr | for' Enumerators (do' Expr | `yield' Expr)

[+] private def fromWithinClassConstr ( body: => T ) : T
[+] private def fromWithinReturnType ( body: => T ) : T
[+] def funParams ( mods: Modifiers , location: Value ) : List [ Tree ]

FunParams ::= Bindings | id | _' Bindings ::=(' [Binding {,' Binding}])'

[+] def generator ( ) : Tree

Generator ::= Pattern `<-' Expr

[+] def generatorRest ( pat: Tree ) : GenFrom
[+] def guard ( ) : Tree

Guard ::= if PostfixExpr

[+] def ident ( ) : TermName

Accept identifier and return its name as a term name.

[+] def ifExpr ( start: Offset , mkIf: (Tree, Tree, Tree) => If ) : If

if'(' Expr )' {nl} Expr [[semi] else Expr]if' Expr `then' Expr [[semi] else Expr]

[+] def implicitClosure ( start: Int , location: Value , implicitMods: Modifiers ) : Tree

Expr ::= ClosureMods FunParams =>' Expr BlockResult ::= implicit id [:' InfixType] `=>' Block // Scala2 only

[+] private def implicitKwPos ( start: Int ) : Span
[+] def implicitMatch ( start: Int , imods: Modifiers ) : Match [ Untyped ]

`match' { ImplicitCaseClauses }

[+] def importClause ( leading: Token , mkTree: ImportConstr ) : List [ Tree ]

Import ::= import [implied] [ImportExpr {,' ImportExpr} Export ::= export [implied] [ImportExpr {,' ImportExpr}

[+] def importExpr ( importImplied: Boolean , mkTree: ImportConstr ) : () => Tree

ImportExpr ::= StableId .' (id |_' | ImportSelectors)

[+] def importSelector ( ) : Tree

ImportSelector ::= id [=>' id |=>' `_']

[+] def importSelectors ( ) : List [ Tree ]

ImportSelectors ::= {' {ImportSelector,'} (ImportSelector | _')}'

[+] def inBraces ( body: => T ) : T
[+] def inBrackets ( body: => T ) : T
[+] def inDefScopeBraces ( body: => T ) : T
[+] def inParens ( body: => T ) : T
[+] def incompleteInputError ( msg: => Message ) : Unit

Issue an error at current offset that input is incomplete

[+] def infixOps ( first: Tree , canStartOperand: Token => Boolean , operand: () => Tree , isType: Boolean , isOperator: => Boolean , maybePostfix: Boolean ) : Tree

operand { infixop operand | ‘given’ (operand | ParArgumentExprs) } [postfixop],

respecting rules of associativity and precedence.

[+] def infixOps$default$4 : Boolean

operand { infixop operand | ‘given’ (operand | ParArgumentExprs) } [postfixop],

respecting rules of associativity and precedence.

[+] def infixOps$default$5 : Boolean

operand { infixop operand | ‘given’ (operand | ParArgumentExprs) } [postfixop],

respecting rules of associativity and precedence.

[+] def infixOps$default$6 : Boolean

operand { infixop operand | ‘given’ (operand | ParArgumentExprs) } [postfixop],

respecting rules of associativity and precedence.

[+] def infixPattern ( ) : Tree

InfixPattern ::= SimplePattern {id [nl] SimplePattern}

[+] def infixType ( ) : Tree

InfixType ::= RefinedType {id [nl] refinedType}

[+] def infixTypeRest ( t: Tree ) : Tree
[+] def inheritClauses ( ) : ( List [ Tree ], List [ Tree ] )

InheritClauses ::= [‘extends’ ConstrApps] [‘derives’ QualId {‘,’ QualId}]

[+] def instanceDef ( start: Offset , mods: Modifiers , instanceMod: Mod ) : MemberDef [ Untyped ]

InstanceDef ::= [id] InstanceParams InstanceBody InstanceParams ::= [DefTypeParamClause] {GivenParamClause} InstanceBody ::= [‘for’ ConstrApp {‘,’ ConstrApp }] [TemplateBody] | ‘for’ Type ‘=’ Expr

[+] private def interpolatedString ( inPattern: Boolean ) : Tree
[+] private def interpolatedString$default$1 : Boolean
[+] def isBindingIntro : Boolean
[+] def isDclIntro : Boolean
[+] def isDefIntro ( allowedMods: BitSet ) : Boolean
[+] def isExprIntro : Boolean
[+] def isIdent : Boolean
[+] def isIdent ( name: Name ) : Boolean
[+] def isLeqIndented ( offset1: Int , offset2: Int ) : Boolean

Is offset1 less or equally indented than offset2? This is the case if the characters between the preceding end-of-line and offset1 are a prefix of the characters between the preceding end-of-line and offset2.

[+] def isLiteral : Boolean
[+] def isModifier : Boolean

Is current token a hard or soft modifier (in modifier position or not)?

[+] def isNumericLit : Boolean
[+] def isPostfixStar : Boolean

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

[+] def isSimpleLiteral : Boolean
[+] def isSplice : Boolean

A '$' identifier is treated as a splice if followed by a {. A longer identifier starting with $ is treated as a splice/id combination in a quoted block '{...'

[+] def isStatSep : Boolean
[+] def isStatSeqEnd : Boolean
[+] def isTemplateIntro : Boolean
[+] def isWildcard ( t: Tree ) : Boolean
[+] def isWildcardType ( t: Tree ) : Boolean
[+] def literal ( negOffset: Int , inPattern: Boolean ) : Tree

SimpleExpr ::= literal | 'id | 'this | 'true | 'false | 'null | null

[+] def literal$default$1 : Offset

SimpleExpr ::= literal | 'id | 'this | 'true | 'false | 'null | null

[+] def literal$default$2 : Boolean

SimpleExpr ::= literal | 'id | 'this | 'true | 'false | 'null | null

[+] def localDef ( start: Int , implicitMods: Modifiers ) : Tree
[+] def localDef$default$2 : Modifiers
[+] private def makeIdent ( tok: Token , offset: Offset , name: Name ) : Ident
[+] def makePackaging ( start: Int , pkg: Tree , stats: List [ Tree ] ) : PackageDef

Create a tree representing a packaging

[+] def matchExpr ( t: Tree , start: Offset , mkMatch: (Tree, List [ CaseDef ]) => Match ) : Match [ Untyped ]

`match' { CaseClauses }

[+] def matchType ( bound: Tree , t: Tree ) : MatchTypeTree

`match' { TypeCaseClauses }

[+] def migrationWarningOrError ( msg: String , offset: Int ) : Unit
[+] def migrationWarningOrError$default$2 : Offset
[+] def mixinQualifierOpt ( ) : Ident

MixinQualifier ::= [' id]'

[+] private def modOfToken ( tok: Int , name: Name ) : Mod
[+] def modifiers ( allowed: BitSet , start: Modifiers ) : Modifiers

{Annotation} {Modifier} Modifiers ::= {Modifier} LocalModifiers ::= {LocalModifier} AccessModifier ::= (private | protected) [AccessQualifier] Modifier ::= LocalModifier | AccessModifier | override LocalModifier ::= abstract | final | sealed | implicit | lazy | erased | inline

[+] def modifiers$default$1 : TokenSet

{Annotation} {Modifier} Modifiers ::= {Modifier} LocalModifiers ::= {LocalModifier} AccessModifier ::= (private | protected) [AccessQualifier] Modifier ::= LocalModifier | AccessModifier | override LocalModifier ::= abstract | final | sealed | implicit | lazy | erased | inline

[+] def modifiers$default$2 : Modifiers

{Annotation} {Modifier} Modifiers ::= {Modifier} LocalModifiers ::= {LocalModifier} AccessModifier ::= (private | protected) [AccessQualifier] Modifier ::= LocalModifier | AccessModifier | override LocalModifier ::= abstract | final | sealed | implicit | lazy | erased | inline

[+] def mustStartStat : Boolean
[+] def newExpr ( ) : Tree

SimpleExpr ::= ‘new’ (ConstrApp {with ConstrApp} [TemplateBody] | TemplateBody)

[+] def newLineOpt ( ) : Unit
[+] def newLineOptWhenFollowedBy ( token: Int ) : Unit
[+] def newLineOptWhenFollowing ( p: Int => Boolean ) : Unit
[+] def newLinesOpt ( ) : Unit
[+] private def normalize ( mods: Modifiers ) : Modifiers

Drop private' modifier when followed by a qualifier. Contractabstract' and `override' to ABSOVERRIDE

[+] def objectDef ( start: Offset , mods: Modifiers ) : ModuleDef

ObjectDef ::= id TemplateOpt

[+] def objectDefRest ( start: Offset , mods: Modifiers , name: TermName ) : ModuleDef
[+] def opStack_= ( x$1: List [ OpInfo ] ) : Unit
[+] def packaging ( start: Int ) : Tree

Packaging ::= package QualId [nl] {' TopStatSeq}'

[+] def parArgumentExprs ( ) : List [ Tree ]

ParArgumentExprs ::= (' [ExprsInParens])' | (' [ExprsInParens,'] PostfixExpr :'_' `*' ')'

[+] def parArgumentExprss ( fn: Tree ) : Tree

ParArgumentExprss ::= {ParArgumentExprs}

Special treatment for arguments to primary constructor annotations. (...) is considered an argument only if it does not look like a formal parameter list, i.e. does not start with ( <annot>* <mod>* ident : Furthermore, () is considered a annotation argument only if it comes first.

[+] def paramClause ( ofClass: Boolean , ofCaseClass: Boolean , prefix: Boolean , firstClause: Boolean , initialMods: Modifiers ) : List [ ValDef ]

ClsParamClause ::= [nl] [‘erased’] ‘(’ [ClsParams] ‘)’ | ‘given’ [‘erased’] (‘(’ ClsParams ‘)’ | GivenTypes) ClsParams ::= ClsParam {' ClsParam} ClsParam ::= {Annotation} [{ParamModifier} (val' | var') |inline'] Param DefParamClause ::= [nl] [‘erased’] ‘(’ [DefParams] ‘)’ | GivenParamClause GivenParamClause ::= ‘given’ [‘erased’] (‘(’ DefParams ‘)’ | GivenTypes) GivenTypes ::= RefinedType {,' RefinedType} DefParams ::= DefParam {,' DefParam} DefParam ::= {Annotation} [inline'] Param Param ::= id:' ParamType [`=' Expr]

[+] def paramClause$default$1 : Boolean

ClsParamClause ::= [nl] [‘erased’] ‘(’ [ClsParams] ‘)’ | ‘given’ [‘erased’] (‘(’ ClsParams ‘)’ | GivenTypes) ClsParams ::= ClsParam {' ClsParam} ClsParam ::= {Annotation} [{ParamModifier} (val' | var') |inline'] Param DefParamClause ::= [nl] [‘erased’] ‘(’ [DefParams] ‘)’ | GivenParamClause GivenParamClause ::= ‘given’ [‘erased’] (‘(’ DefParams ‘)’ | GivenTypes) GivenTypes ::= RefinedType {,' RefinedType} DefParams ::= DefParam {,' DefParam} DefParam ::= {Annotation} [inline'] Param Param ::= id:' ParamType [`=' Expr]

[+] def paramClause$default$2 : Boolean

ClsParamClause ::= [nl] [‘erased’] ‘(’ [ClsParams] ‘)’ | ‘given’ [‘erased’] (‘(’ ClsParams ‘)’ | GivenTypes) ClsParams ::= ClsParam {' ClsParam} ClsParam ::= {Annotation} [{ParamModifier} (val' | var') |inline'] Param DefParamClause ::= [nl] [‘erased’] ‘(’ [DefParams] ‘)’ | GivenParamClause GivenParamClause ::= ‘given’ [‘erased’] (‘(’ DefParams ‘)’ | GivenTypes) GivenTypes ::= RefinedType {,' RefinedType} DefParams ::= DefParam {,' DefParam} DefParam ::= {Annotation} [inline'] Param Param ::= id:' ParamType [`=' Expr]

[+] def paramClause$default$3 : Boolean

ClsParamClause ::= [nl] [‘erased’] ‘(’ [ClsParams] ‘)’ | ‘given’ [‘erased’] (‘(’ ClsParams ‘)’ | GivenTypes) ClsParams ::= ClsParam {' ClsParam} ClsParam ::= {Annotation} [{ParamModifier} (val' | var') |inline'] Param DefParamClause ::= [nl] [‘erased’] ‘(’ [DefParams] ‘)’ | GivenParamClause GivenParamClause ::= ‘given’ [‘erased’] (‘(’ DefParams ‘)’ | GivenTypes) GivenTypes ::= RefinedType {,' RefinedType} DefParams ::= DefParam {,' DefParam} DefParam ::= {Annotation} [inline'] Param Param ::= id:' ParamType [`=' Expr]

[+] def paramClause$default$4 : Boolean

ClsParamClause ::= [nl] [‘erased’] ‘(’ [ClsParams] ‘)’ | ‘given’ [‘erased’] (‘(’ ClsParams ‘)’ | GivenTypes) ClsParams ::= ClsParam {' ClsParam} ClsParam ::= {Annotation} [{ParamModifier} (val' | var') |inline'] Param DefParamClause ::= [nl] [‘erased’] ‘(’ [DefParams] ‘)’ | GivenParamClause GivenParamClause ::= ‘given’ [‘erased’] (‘(’ DefParams ‘)’ | GivenTypes) GivenTypes ::= RefinedType {,' RefinedType} DefParams ::= DefParam {,' DefParam} DefParam ::= {Annotation} [inline'] Param Param ::= id:' ParamType [`=' Expr]

[+] def paramClause$default$5 : Modifiers

ClsParamClause ::= [nl] [‘erased’] ‘(’ [ClsParams] ‘)’ | ‘given’ [‘erased’] (‘(’ ClsParams ‘)’ | GivenTypes) ClsParams ::= ClsParam {' ClsParam} ClsParam ::= {Annotation} [{ParamModifier} (val' | var') |inline'] Param DefParamClause ::= [nl] [‘erased’] ‘(’ [DefParams] ‘)’ | GivenParamClause GivenParamClause ::= ‘given’ [‘erased’] (‘(’ DefParams ‘)’ | GivenTypes) GivenTypes ::= RefinedType {,' RefinedType} DefParams ::= DefParam {,' DefParam} DefParam ::= {Annotation} [inline'] Param Param ::= id:' ParamType [`=' Expr]

[+] def paramClauses ( ofClass: Boolean , ofCaseClass: Boolean , ofInstance: Boolean ) : List [ List [ ValDef ] ]

ClsParamClauses ::= {ClsParamClause} [[nl] ‘(’ [‘implicit’] ClsParams ‘)’] DefParamClauses ::= {DefParamClause} [[nl] ‘(’ [‘implicit’] DefParams ‘)’]

[+] def paramClauses$default$1 : Boolean

ClsParamClauses ::= {ClsParamClause} [[nl] ‘(’ [‘implicit’] ClsParams ‘)’] DefParamClauses ::= {DefParamClause} [[nl] ‘(’ [‘implicit’] DefParams ‘)’]

[+] def paramClauses$default$2 : Boolean

ClsParamClauses ::= {ClsParamClause} [[nl] ‘(’ [‘implicit’] ClsParams ‘)’] DefParamClauses ::= {DefParamClause} [[nl] ‘(’ [‘implicit’] DefParams ‘)’]

[+] def paramClauses$default$3 : Boolean

ClsParamClauses ::= {ClsParamClause} [[nl] ‘(’ [‘implicit’] ClsParams ‘)’] DefParamClauses ::= {DefParamClause} [[nl] ‘(’ [‘implicit’] DefParams ‘)’]

[+] def paramType ( ) : Tree

ParamType ::= [`=>'] ParamValueType

[+] def paramValueType ( ) : Tree

ParamValueType ::= Type [`*']

[+] def parse ( ) : Tree

This is the general parse entry point. Overridden by ScriptParser

[+] def patDefOrDcl ( start: Offset , mods: Modifiers ) : Tree

PatDef ::= Pattern2 {,' Pattern2} [:' Type] =' Expr VarDef ::= PatDef | id {,' id} :' Type=' _' ValDcl ::= id {,' id} :' Type VarDcl ::= id {,' id} `:' Type

[+] def path ( thisOK: Boolean , finish: Tree => Tree ) : Tree

Path ::= StableId | [id `.'] this

[+] def path$default$2 : Tree => Tree

Path ::= StableId | [id `.'] this

[+] def pattern1 ( ) : Tree

Pattern1 ::= PatVar Ascription | Pattern2

[+] def patternAlts ( ) : List [ Tree ]
[+] def patterns ( ) : List [ Tree ]

Patterns ::= Pattern [`,' Pattern]

[+] def patternsOpt ( ) : List [ Tree ]
[+] def placeholderParams_= ( x$1: List [ ValDef ] ) : Unit

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

[+] def posMods ( start: Int , mods: Modifiers ) : Modifiers
[+] def postfixExpr ( ) : Tree

PostfixExpr ::= InfixExpr [id [nl]] InfixExpr ::= PrefixExpr | InfixExpr id [nl] InfixExpr | InfixExpr ‘given’ (InfixExpr | ParArgumentExprs)

[+] def qualId ( ) : Tree

QualId ::= id {`.' id}

[+] def reduceStack ( base: List [ OpInfo ] , top: Tree , prec: Int , leftAssoc: Boolean , op2: Name , isType: Boolean ) : Tree
[+] def refineStatSeq ( ) : List [ Tree ]

RefineStatSeq ::= RefineStat {semi RefineStat} RefineStat ::= ‘val’ VarDcl | ‘def’ DefDcl | ‘type’ {nl} TypeDcl (in reality we admit Defs and vars and filter them out afterwards in checkLegal)

[+] def refinedTypeRest ( t: Tree ) : Tree
[+] def refinement ( ) : List [ Tree ]

Refinement ::= {' RefineStatSeq}'

[+] def rejectWildcardType ( t: Tree , fallbackTree: Tree ) : Tree
[+] def rejectWildcardType$default$2 : Select
[+] def selector ( t: Tree ) : Tree

Accept identifier acting as a selector on given tree t.

[+] def selectors ( t: Tree , finish: Tree => Tree ) : Tree

Selectors ::= id { `.' id }

Accept .' separated identifiers acting as a selectors on given treet`.

[+] def selfInvocation ( ) : Tree

SelfInvocation ::= this ArgumentExprs {ArgumentExprs}

[+] def setLastStatOffset ( ) : Unit
[+] def simpleExpr ( ) : Tree

SimpleExpr ::= ‘new’ (ConstrApp [TemplateBody] | TemplateBody) | BlockExpr | ‘$’ ‘{’ Block ‘}’ | Quoted | quoteId | SimpleExpr1 [_'] SimpleExpr1 ::= literal | xmlLiteral | Path |(' [ExprsInParens] )' | SimpleExpr.' id | SimpleExpr (TypeArgs | NamedTypeArgs) | SimpleExpr1 ArgumentExprs Quoted ::= ‘'’ ‘{’ Block ‘}’ | ‘'’ ‘[’ Type ‘]’

[+] def simpleExprRest ( t: Tree , canApply: Boolean ) : Tree
[+] def simpleExprRest$default$2 : Boolean
[+] def simplePatternRest ( t: Tree ) : Tree
[+] def simpleType ( ) : Tree

SimpleType ::= SimpleType TypeArgs | SimpleType #' id | StableId | Path.' type | (' ArgTypes)' | `_' TypeBounds | Refinement | Literal | ‘$’ ‘{’ Block ‘}’

[+] private def simpleTypeRest ( t: Tree ) : Tree
[+] protected def skip ( ) : Unit

Skip on error to next safe point. Safe points are: - Closing braces, provided they match an opening brace before the error point. - Closing parens and brackets, provided they match an opening parent or bracket before the error point and there are no intervening other kinds of parens. - Semicolons and newlines, provided there are no intervening braces. - Definite statement starts on new lines, provided they are not more indented than the last known statement start before the error point.

[+] def splice ( isType: Boolean ) : Tree

SimpleEpxr ::= spliceId | ‘$’ ‘{’ Block ‘}’) SimpleType ::= spliceId | ‘$’ ‘{’ Block ‘}’)

[+] def stableId ( ) : Tree

StableId ::= id | Path .' id | [id '.'] super [[' id ]'].' id

[+] def stagedBlock ( ) : Tree [ Untyped ]

The block in a quote or splice

[+] def syntaxErrorOrIncomplete ( msg: => Message , offset: Int ) : Unit

If at end of file, issue an incompleteInputError. Otherwise issue a syntax error and skip to next safe point.

[+] def syntaxErrorOrIncomplete$default$2 : Offset

If at end of file, issue an incompleteInputError. Otherwise issue a syntax error and skip to next safe point.

[+] def template ( constr: DefDef , isEnum: Boolean ) : Template

Template ::= InheritClauses [TemplateBody]

[+] def template$default$2 : Boolean

Template ::= InheritClauses [TemplateBody]

[+] def templateBody ( ) : ( ValDef, List [ Tree ] )
[+] def templateBodyOpt ( constr: DefDef , parents: List [ Tree ] , derived: List [ Tree ] ) : Template

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

[+] def templateOpt ( constr: DefDef ) : Template

TemplateOpt = [Template]

[+] def templateStatSeq ( ) : ( ValDef, List [ Tree ] )

TemplateStatSeq ::= [id [:' Type]=>'] TemplateStat {semi TemplateStat} TemplateStat ::= Import | Export | Annotations Modifiers Def | Annotations Modifiers Dcl | Expr1 | EnumStat ::= TemplateStat | Annotations Modifiers EnumCase

[+] def termIdent ( ) : Ident

Accept identifier and return Ident with its name as a term name.

[+] def termIdentOrWildcard ( ) : Ident
[+] def tmplDef ( start: Int , mods: Modifiers ) : Tree

TmplDef ::= ([case'] ‘class’ | trait’) ClassDef | [case'] `object' ObjectDef | ‘enum’ EnumDef | ‘instance’ InstanceDef

[+] def tokenSeparated ( separator: Int , part: () => T ) : List [ T ]

part { separator part }

[+] def topStatSeq ( ) : List [ Tree ]

TopStatSeq ::= TopStat {semi TopStat} TopStat ::= Import | Export | Annotations Modifiers Def | Packaging | package object objectDef |

[+] def toplevelTyp ( ) : Tree

Same as [[typ]], but if this results in a wildcard it emits a syntax error and returns a tree for type Any instead.

[+] def typ ( ) : Tree

Type ::= FunTypeMods FunArgTypes =>' Type | HkTypeParamClause->' Type | InfixType FunArgTypes ::= InfixType | (' [ FunArgType {,' FunArgType } ] `)' | '(' TypedFunParam {',' TypedFunParam } ')'

[+] def typeArgs ( namedOK: Boolean , wildOK: Boolean ) : List [ Tree ]

TypeArgs ::= [' Type {,' Type} ]' NamedTypeArgs ::=[' NamedTypeArg {,' NamedTypeArg}]'

[+] def typeBounds ( ) : TypeBoundsTree

TypeBounds ::= [>:' Type] [<:' Type]

[+] def typeDefOrDcl ( start: Offset , mods: Modifiers ) : Tree

TypeDcl ::= id [TypeParamClause] (TypeBounds | ‘=’ Type) | id [TypeParamClause] <: Type = MatchType

[+] def typeDependingOn ( location: Value ) : Tree
[+] def typeIdent ( ) : Ident

Accept identifier and return Ident with its name as a type name.

[+] def typeParamBounds ( pname: TypeName ) : Tree

TypeParamBounds ::= TypeBounds {<%' Type} {:' Type}

[+] def typeParamClause ( ownerKind: Value ) : List [ TypeDef ]

ClsTypeParamClause::= [' ClsTypeParam {,' ClsTypeParam} ]' ClsTypeParam ::= {Annotation} [+' | `-'] id [HkTypeParamClause] TypeParamBounds

DefTypeParamClause::= [' DefTypeParam {,' DefTypeParam} `]' DefTypeParam ::= {Annotation} id [HkTypeParamClause] TypeParamBounds

TypTypeParamCaluse::= [' TypTypeParam {,' TypTypeParam} `]' TypTypeParam ::= {Annotation} id [HkTypePamClause] TypeBounds

HkTypeParamClause ::= [' HkTypeParam {,' HkTypeParam} ]' HkTypeParam ::= {Annotation} ['+' |-'] (id [HkTypePamClause] | _') TypeBounds

[+] def typeParamClauseOpt ( ownerKind: Value ) : List [ TypeDef ]
[+] private def typeProjection ( t: Tree ) : Tree
[+] def typedFunParam ( start: Offset , name: TermName , mods: Modifiers ) : Tree

TypedFunParam ::= id ':' Type

[+] def typedFunParam$default$3 : Modifiers

TypedFunParam ::= id ':' Type

[+] def typedOpt ( ) : Tree
[+] def warning ( msg: => Message , sourcePos: SourcePosition ) : Unit
[+] def warning ( msg: => Message , offset: Int ) : Unit
[+] def warning$default$2 : Offset
[+] def wildcardIdent ( ) : Ident
[+] def withType ( ) : Tree

WithType ::= AnnotType {`with' AnnotType} (deprecated)

[+] def withTypeRest ( t: Tree ) : Tree
[+] private def withinEnum ( body: => T ) : T
[+] def withinStaged ( kind: StageKind ) ( op: => T ) : T
[+] def wrapNew ( tpt: Tree ) : Select

Wrap annotation or constructor in New(...).

[+] def xmlLiteral ( ) : Tree
[+] def xmlLiteralPattern ( ) : Tree