Parser

dotty.tools.dotc.parsing.Parsers.Parser
class Parser(source: SourceFile)(using x$2: Context) extends ParserCommon

Attributes

Graph
Supertypes
class ParserCommon
class Object
trait Matchable
class Any
Known subtypes

Members list

Type members

Classlikes

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Types

Value members

Concrete methods

def accept(token: Int): Int

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

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

Attributes

Returns

The offset at the start of the token to accept

def accept(name: Name): Int
def acceptColon(): Int

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

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

Attributes

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

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

Attributes

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

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

Attributes

def adjustStart(start: Offset)(tree: Tree): Tree

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

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

Attributes

def annot(): Tree

Annotation ::= `@' SimpleType1 {ParArgumentExprs}

Annotation ::= `@' SimpleType1 {ParArgumentExprs}

Attributes

def annotType(): Tree

AnnotType ::= SimpleType {Annotation}

AnnotType ::= SimpleType {Annotation}

Attributes

def annotations(skipNewLines: Boolean): List[Tree]
def annotsAsMods(skipNewLines: Boolean): Modifiers
def argTypes(namedOK: Boolean, wildOK: Boolean): List[Tree]

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

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

Attributes

ArgumentExprs ::= ParArgumentExprs | [nl] BlockExpr

ArgumentExprs ::= ParArgumentExprs | [nl] BlockExpr

Attributes

ArgumentExprss ::= {ArgumentExprs}

ArgumentExprss ::= {ArgumentExprs}

Attributes

ArgumentPatterns ::= ‘(’ [Patterns] ‘)’ | ‘(’ [Patterns ‘,’] PatVar ‘*’ ‘)’

ArgumentPatterns ::= ‘(’ [Patterns] ‘)’ | ‘(’ [Patterns ‘,’] PatVar ‘*’ ‘)’

Attributes

def ascription(t: Tree, location: Location): Tree
def binding(mods: Modifiers): Tree

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

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

Attributes

def block(simplify: Boolean): Tree

Block ::= BlockStatSeq

Block ::= BlockStatSeq

Attributes

Note

Return tree does not have a defined span.

def blockExpr(): Tree

BlockExpr ::= <<< (CaseClauses | Block) >>>

BlockExpr ::= <<< (CaseClauses | Block) >>>

Attributes

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

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

Attributes

def bracesToIndented[T](body: => T, rewriteWithColon: Boolean): T

Parse brace-enclosed body and rewrite it to be an indentation region instead, if possible. If possible means:

Parse brace-enclosed body and rewrite it to be an indentation region instead, if possible. If possible means:

  1. not inside (...), [...], case ... =>
  2. opening brace { is at end of line
  3. closing brace } is at start of line
  4. there is at least one token between the braces
  5. the closing brace is also at the end of the line, or it is followed by one of then, else, do, catch, finally, yield, or match.
  6. the opening brace does not follow a =>. The reason for this condition is that rewriting back to braces does not work after => (since in most cases braces are omitted after a => it would be annoying if braces were inserted).
  7. not a code block being the input to a direct symbolic function call inst method {\n expr \n} cannot become inst method :\n expr for a fully symbolic method

Attributes

def captureRef(): Tree

CaptureRef ::= ident | this

CaptureRef ::= ident | this

Attributes

def captureSet(): List[Tree]

CaptureSet ::= { CaptureRef {, CaptureRef} } -- under captureChecking

CaptureSet ::= { CaptureRef {, CaptureRef} } -- under captureChecking

Attributes

def capturesAndResult(core: () => Tree): Tree
def caseClause(exprOnly: Boolean): CaseDef

CaseClause ::= ‘case’ Pattern [Guard] `=>' Block ExprCaseClause ::= ‘case’ Pattern [Guard] ‘=>’ Expr

CaseClause ::= ‘case’ Pattern [Guard] `=>' Block ExprCaseClause ::= ‘case’ Pattern [Guard] ‘=>’ Expr

Attributes

def caseClauses(clause: () => CaseDef): List[CaseDef]

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

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

Attributes

def caseTemplate(constr: DefDef): Template

[`extends' ConstrApps]

[`extends' ConstrApps]

Attributes

def checkAssoc(offset: Token, op1: Name, op2: Name, op2LeftAssoc: Boolean): Unit
def checkEndMarker[T <: Tree](stats: ListBuffer[T]): Unit
def checkExtensionMethod(tparams: List[Tree], vparamss: List[List[Tree]], stat: Tree): Unit

Check that this is not the start of a statement that's indented relative to the current region.

Check that this is not the start of a statement that's indented relative to the current region.

Attributes

def checkNoEscapingPlaceholders[T](op: => T): T

Checks that tuples don't contain a parameter.

Checks that tuples don't contain a parameter.

Attributes

def classConstr(paramOwner: ParamOwner): DefDef

ClassConstr ::= [ClsTypeParamClause] [ConstrMods] ClsTermParamClauses

ClassConstr ::= [ClsTypeParamClause] [ConstrMods] ClsTermParamClauses

Attributes

def classDef(start: Offset, mods: Modifiers): TypeDef

ClassDef ::= id ClassConstr TemplateOpt

ClassDef ::= id ClassConstr TemplateOpt

Attributes

def classDefRest(start: Offset, mods: Modifiers, name: TypeName): TypeDef

The region to eliminate when replacing a closing ) or } that starts a new line The ) or } precedes in.lastOffset.

The region to eliminate when replacing a closing ) or } that starts a new line The ) or } precedes in.lastOffset.

Attributes

def closure(start: Int, location: Location, implicitMods: Modifiers): Tree

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

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

Attributes

def closureRest(start: Int, location: Location, params: List[Tree]): Tree
def commaSeparated[T](part: () => T): List[T]

{ , }

{ , }

Attributes

def commaSeparatedRest[T](leading: T, part: () => T): List[T]

{, }

{, }

currentRegion.commasExpected has to be set separately.

Attributes

CompilationUnit ::= {package QualId semi} TopStatSeq

CompilationUnit ::= {package QualId semi} TopStatSeq

Attributes

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

ConstrApps ::= ConstrApp ({‘,’ ConstrApp} | {‘with’ ConstrApp})

ConstrApps ::= ConstrApp ({‘,’ ConstrApp} | {‘with’ ConstrApp})

Attributes

ConstrMods ::= {Annotation} [AccessModifier]

ConstrMods ::= {Annotation} [AccessModifier]

Attributes

def contextTypes(paramOwner: ParamOwner, numLeadParams: Int, impliedMods: Modifiers): List[ValDef]

ContextTypes ::= FunArgType {‘,’ FunArgType}

ContextTypes ::= FunArgType {‘,’ FunArgType}

Attributes

def convertToParam(tree: Tree, mods: Modifiers): ValDef

Convert tree to formal parameter

Convert tree to formal parameter

Attributes

Convert tree to formal parameter list

Convert tree to formal parameter list

Attributes

def convertToTypeId(tree: Tree): Tree

Convert (qual)ident to type identifier

Convert (qual)ident to type identifier

Attributes

def defAnnotsMods(allowed: BitSet): Modifiers
def defDefOrDcl(start: Offset, mods: Modifiers, numLeadParams: Int): DefDef

DefDef ::= DefSig [‘:’ Type] [‘=’ Expr] | this TypelessClauses [DefImplicitClause] `=' ConstrExpr DefSig ::= id [DefTypeParamClause] DefTermParamClauses

DefDef ::= DefSig [‘:’ Type] [‘=’ Expr] | this TypelessClauses [DefImplicitClause] `=' ConstrExpr DefSig ::= id [DefTypeParamClause] DefTermParamClauses

if clauseInterleaving is enabled: DefSig ::= id [DefParamClauses] [DefImplicitClause]

Attributes

def defOrDcl(start: Int, mods: Modifiers): Tree

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

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

Attributes

def deprecationWarning(msg: Message, offset: Int): Unit

DotSelectors ::= { `.' id }

DotSelectors ::= { `.' id }

Attributes

def dropParensOrBraces(start: Offset, endStr: String): Unit

Drop (...) or { ... }, replacing the closing element with endStr

Drop (...) or { ... }, replacing the closing element with endStr

Attributes

Drop current token, if it is a then or do.

Drop current token, if it is a then or do.

Attributes

def enclosed[T](tok: Token, body: => T): T
def enclosedWithCommas[T](tok: Token, body: => T): T

Same as enclosed, but if closing token is missing, add , to the expected tokens in the error message provided the next token could have followed a ,.

Same as enclosed, but if closing token is missing, add , to the expected tokens in the error message provided the next token could have followed a ,.

Attributes

def enumCase(start: Offset, mods: Modifiers): DefTree

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

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

Attributes

def enumDef(start: Offset, mods: Modifiers): TypeDef

EnumDef ::= id ClassConstr InheritClauses EnumBody

EnumDef ::= id ClassConstr InheritClauses EnumBody

Attributes

def enumerator(): Tree

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

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

Attributes

Enumerators ::= Generator {semi Enumerator | Guard}

Enumerators ::= Generator {semi Enumerator | Guard}

Attributes

def errorTermTree(start: Offset): Tree
def expr(location: Location): Tree
def expr1(location: Location): Tree
def expr1Rest(t: Tree, location: Location): Tree

ExprsInParens ::= ExprInParens {,' ExprInParens} Bindings ::= Binding {,' Binding}

ExprsInParens ::= ExprInParens {,' ExprInParens} Bindings ::= Binding {,' Binding}

Attributes

def extMethod(numLeadParams: Int): DefDef

ExtMethod ::= {Annotation [nl]} {Modifier} ‘def’ DefDef | Export

ExtMethod ::= {Annotation [nl]} {Modifier} ‘def’ DefDef | Export

Attributes

def extMethods(numLeadParams: Int): List[Tree]

ExtMethods ::= ExtMethod | [nl] ‘{’ ExtMethod {semi ExtMethod ‘}’

ExtMethods ::= ExtMethod | [nl] ‘{’ ExtMethod {semi ExtMethod ‘}’

Attributes

Extension ::= ‘extension’ [DefTypeParamClause] {UsingParamClause} ‘(’ DefTermParam ‘)’ {UsingParamClause} ExtMethods

Extension ::= ‘extension’ [DefTypeParamClause] {UsingParamClause} ‘(’ DefTermParam ‘)’ {UsingParamClause} ExtMethods

Attributes

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

The position of the first XML literal encountered while parsing, NoSourcePosition if there were no XML literals.

The position of the first XML literal encountered while parsing, NoSourcePosition if there were no XML literals.

Attributes

In the tokens following the current one, does query precede any of the tokens that

In the tokens following the current one, does query precede any of the tokens that

  • must start a statement, or
  • separate two statements, or
  • continue a statement (e.g. else, catch`), or
  • terminate the current scope?

Attributes

Is the following sequence the generators of a for-expression enclosed in (...)?

Is the following sequence the generators of a for-expression enclosed in (...)?

Attributes

Are the next token the "GivenSig" part of a given definition, i.e. an identifier followed by type and value parameters, followed by :?

Are the next token the "GivenSig" part of a given definition, i.e. an identifier followed by type and value parameters, followed by :?

Attributes

Is the token sequence following the current : token classified as a lambda? This is the case if the input starts with an identifier, a wildcard, or something enclosed in (...) or [...], and this is followed by a => or ?=> and an INDENT.

Is the token sequence following the current : token classified as a lambda? This is the case if the input starts with an identifier, a wildcard, or something enclosed in (...) or [...], and this is followed by a => or ?=> and an INDENT.

Attributes

When encountering a :, is that in the binding of a lambda?

When encountering a :, is that in the binding of a lambda?

Attributes

Is current ident a *, and is it followed by a ), , ), ,EOF? The latter two are not syntactically valid, but we need to include them here for error recovery.

Is current ident a *, and is it followed by a ), , ), ,EOF? The latter two are not syntactically valid, but we need to include them here for error recovery.

Attributes

def forExpr(): Tree

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

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

Attributes

FunParamClause ::= ‘(’ TypedFunParam {‘,’ TypedFunParam } ‘)’

FunParamClause ::= ‘(’ TypedFunParam {‘,’ TypedFunParam } ‘)’

Attributes

def funParams(mods: Modifiers, location: Location): List[Tree]

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

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

Attributes

def generator(): Tree

Generator ::= [‘case’] Pattern `<-' Expr

Generator ::= [‘case’] Pattern `<-' Expr

Attributes

def generatorRest(pat: Tree, casePat: Boolean): GenFrom
def givenDef(start: Offset, mods: Modifiers, givenMod: Mod): MemberDef[Untyped]

GivenDef ::= [GivenSig] (AnnotType [‘=’ Expr] | StructuralInstance) GivenSig ::= [id] [DefTypeParamClause] {UsingParamClauses} ‘:’

GivenDef ::= [GivenSig] (AnnotType [‘=’ Expr] | StructuralInstance) GivenSig ::= [id] [DefTypeParamClause] {UsingParamClauses} ‘:’

Attributes

def guard(): Tree

Guard ::= if PostfixExpr

Guard ::= if PostfixExpr

Attributes

def ident(): TermName

Accept identifier and return its name as a term name.

Accept identifier and return its name as a term name.

Attributes

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

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

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

Attributes

def importClause(outermost: Boolean): List[Tree]
def importExpr(leading: Token, mkTree: ImportConstr): () => Tree

ImportExpr ::= SimpleRef {‘.’ id} ‘.’ ImportSpec | SimpleRef ‘as’ id ImportSpec ::= NamedSelector | WildcardSelector | ‘{’ ImportSelectors ‘}’ ImportSelectors ::= NamedSelector [‘,’ ImportSelectors] | WildCardSelector {‘,’ WildCardSelector} NamedSelector ::= id [‘as’ (id | ‘_’)] WildCardSelector ::= ‘*' | ‘given’ [InfixType]

ImportExpr ::= SimpleRef {‘.’ id} ‘.’ ImportSpec | SimpleRef ‘as’ id ImportSpec ::= NamedSelector | WildcardSelector | ‘{’ ImportSelectors ‘}’ ImportSelectors ::= NamedSelector [‘,’ ImportSelectors] | WildCardSelector {‘,’ WildCardSelector} NamedSelector ::= id [‘as’ (id | ‘_’)] WildCardSelector ::= ‘*' | ‘given’ [InfixType]

Attributes

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

Import ::= import' ImportExpr {‘,’ ImportExpr} Export ::=export' ImportExpr {‘,’ ImportExpr}

Import ::= import' ImportExpr {‘,’ ImportExpr} Export ::=export' ImportExpr {‘,’ ImportExpr}

Attributes

def inBraces[T](body: => T): T
def inBracesOrIndented[T](body: => T, rewriteWithColon: Boolean): T
def inBrackets[T](body: => T): T
def inBracketsWithCommas[T](body: => T): T
def inDefScopeBraces[T](body: => T, rewriteWithColon: Boolean): T
def inParens[T](body: => T): T
def inParensWithCommas[T](body: => T): T
def inSepRegion[T](f: Region => Region)(op: => T): T

Issue an error at current offset that input is incomplete

Issue an error at current offset that input is incomplete

Attributes

def indentedToBraces[T](body: => T): T

Parse indentation region body and rewrite it to be in braces instead

Parse indentation region body and rewrite it to be in braces instead

Attributes

def infixOps(first: Tree, canStartOperand: Token => Boolean, operand: Location => Tree, location: Location, kind: ParseKind, isOperator: => Boolean): Tree

operand { infixop operand | MatchClause } [postfixop],

operand { infixop operand | MatchClause } [postfixop],

respecting rules of associativity and precedence.

Value parameters

isOperator

the current token counts as an operator.

maybePostfix

postfix operators are allowed.

Attributes

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

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

Attributes

def infixType(): Tree

InfixType ::= RefinedType {id [nl] RefinedType} | RefinedType ^

InfixType ::= RefinedType {id [nl] RefinedType} | RefinedType ^

Attributes

True if we are seeing a lambda argument after a colon of the form: : (params) => body

True if we are seeing a lambda argument after a colon of the form: : (params) => body

Attributes

def isDefIntro(allowedMods: BitSet, excludedSoftModifiers: Set[TermName]): 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.

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.

Attributes

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

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

Attributes

def isPureArrow(name: Name): 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 '{...'

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 '{...'

Attributes

def literal(negOffset: Int, inPattern: Boolean, inTypeOrSingleton: Boolean, inStringInterpolation: Boolean): Tree

Literal ::= SimpleLiteral | processedStringLiteral | symbolLiteral | ‘null’

Literal ::= SimpleLiteral | processedStringLiteral | symbolLiteral | ‘null’

Value parameters

negOffset

The offset of a preceding `-' sign, if any. If the literal is not negated, negOffset == in.offset.

Attributes

def localDef(start: Int, implicitMods: Modifiers): Tree
def makePackaging(start: Int, pkg: Tree, stats: List[Tree]): PackageDef

Create a tree representing a packaging

Create a tree representing a packaging

Attributes

MatchClause ::= match'{' CaseClauses `}'

MatchClause ::= match'{' CaseClauses `}'

Attributes

`match' <<< TypeCaseClauses >>>

`match' <<< TypeCaseClauses >>>

Attributes

MixinQualifier ::= [' id]'

MixinQualifier ::= [' id]'

Attributes

def mkApply(fn: Tree, args: (List[Tree], Boolean)): Tree
def mkImport(outermost: Boolean): ImportConstr

Create an import node and handle source version imports

Create an import node and handle source version imports

Attributes

def modifiers(allowed: BitSet, start: Modifiers): Modifiers

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

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

Attributes

def newExpr(): Tree

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

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

Attributes

def newLineOpt(): Unit
def newLinesOpt(): Unit
def nextCanFollowOperator(leadingOperandTokens: BitSet): Boolean

Can the next lookahead token start an operand as defined by leadingOperandTokens, or is postfix ops enabled? This is used to decide whether the current token can be an infix operator.

Can the next lookahead token start an operand as defined by leadingOperandTokens, or is postfix ops enabled? This is used to decide whether the current token can be an infix operator.

Attributes

def objectDef(start: Offset, mods: Modifiers): ModuleDef

ObjectDef ::= id TemplateOpt

ObjectDef ::= id TemplateOpt

Attributes

def packaging(start: Int): Tree

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

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

Attributes

ParArgumentExprs ::= (' [‘using’] [ExprsInParens])' | (' [ExprsInParens,'] PostfixExpr `*' ')'

ParArgumentExprs ::= (' [‘using’] [ExprsInParens])' | (' [ExprsInParens,'] PostfixExpr `*' ')'

Attributes

ParArgumentExprss ::= {ParArgumentExprs}

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.

Attributes

def paramType(): Tree

ParamType ::= ParamValueType | =>' ParamValueType |->' [CaptureSet] ParamValueType

ParamType ::= ParamValueType | =>' ParamValueType |->' [CaptureSet] ParamValueType

Attributes

def paramTypeOf(core: () => Tree): Tree

ParamValueType ::= Type [`*']

ParamValueType ::= Type [`*']

Attributes

def parse(): Tree

This is the general parse entry point. Overridden by ScriptParser

This is the general parse entry point. Overridden by ScriptParser

Attributes

def patDefOrDcl(start: Offset, mods: Modifiers): Tree

PatDef ::= ids [‘:’ Type] [‘=’ Expr] | Pattern2 [‘:’ Type] [‘=’ Expr] VarDef ::= PatDef | id {,' id}:' Type ='_' (deprecated in 3.x)

PatDef ::= ids [‘:’ Type] [‘=’ Expr] | Pattern2 [‘:’ Type] [‘=’ Expr] VarDef ::= PatDef | id {,' id}:' Type ='_' (deprecated in 3.x)

Attributes

def pattern(location: Location): Tree

Pattern ::= Pattern1 { `|' Pattern1 }

Pattern ::= Pattern1 { `|' Pattern1 }

Attributes

def pattern1(location: Location): Tree

Pattern1 ::= PatVar Ascription | [‘-’] integerLiteral Ascription | [‘-’] floatingPointLiteral Ascription | Pattern2

Pattern1 ::= PatVar Ascription | [‘-’] integerLiteral Ascription | [‘-’] floatingPointLiteral Ascription | Pattern2

Attributes

def pattern3(): Tree

Pattern3 ::= InfixPattern | PatVar ‘*’

Pattern3 ::= InfixPattern | PatVar ‘*’

Attributes

def patternAlts(location: Location): List[Tree]
def patterns(location: Location): List[Tree]

Patterns ::= Pattern [`,' Pattern]

Patterns ::= Pattern [`,' Pattern]

Attributes

def patternsOpt(location: Location): List[Tree]
def postfixExpr(location: Location): Tree

PostfixExpr ::= InfixExpr [id [nl]] InfixExpr ::= PrefixExpr | InfixExpr id [nl] InfixExpr | InfixExpr id ColonArgument | InfixExpr MatchClause

PostfixExpr ::= InfixExpr [id [nl]] InfixExpr ::= PrefixExpr | InfixExpr id [nl] InfixExpr | InfixExpr id ColonArgument | InfixExpr MatchClause

Attributes

def postfixExprRest(t: Tree, location: Location): Tree
def qualId(): Tree

QualId ::= id {`.' id}

QualId ::= id {`.' id}

Attributes

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

RefineStatSeq ::= RefineStat {semi RefineStat} RefineStat ::= ‘val’ VarDef | ‘def’ DefDef | ‘type’ {nl} TypeDef (in reality we admit class defs and vars and filter them out afterwards in checkLegal)

RefineStatSeq ::= RefineStat {semi RefineStat} RefineStat ::= ‘val’ VarDef | ‘def’ DefDef | ‘type’ {nl} TypeDef (in reality we admit class defs and vars and filter them out afterwards in checkLegal)

Attributes

def refinedType(): Tree
def refinement(indentOK: Boolean): List[Tree]

Refinement ::= {' RefineStatSeq}'

Refinement ::= {' RefineStatSeq}'

Attributes

def rejectWildcardType(t: Tree, fallbackTree: Tree): Tree

rewrite code with (...) around the source code of t

rewrite code with (...) around the source code of t

Attributes

def rewriteNotice(version: SourceVersion, additionalOption: String): String
def selector(t: Tree): Tree

Accept identifier or match clause acting as a selector on given tree t

Accept identifier or match clause acting as a selector on given tree t

Attributes

SelfInvocation ::= this ArgumentExprs {ArgumentExprs}

SelfInvocation ::= this ArgumentExprs {ArgumentExprs}

Attributes

def selfType(): ValDef

SelfType ::= id [‘:’ InfixType] ‘=>’ | ‘this’ ‘:’ InfixType ‘=>’

SelfType ::= id [‘:’ InfixType] ‘=>’ | ‘this’ ‘:’ InfixType ‘=>’

Attributes

def simpleExpr(location: Location): Tree

SimpleExpr ::= ‘new’ ConstrApp {with ConstrApp} [TemplateBody] | ‘new’ TemplateBody | BlockExpr | ExprSplice | Quoted | quoteId | SimpleExpr1 [_] SimpleExpr1 ::= literal | xmlLiteral | SimpleRef | ( [ExprsInParens] ) | SimpleExpr . id | SimpleExpr . MatchClause | SimpleExpr (TypeArgs | NamedTypeArgs) | SimpleExpr1 ArgumentExprs | SimpleExpr1 ColonArgument ColonArgument ::= colon [LambdaStart] indent (CaseClauses | Block) outdent LambdaStart ::= FunParams (‘=>’ | ‘?=>’) | HkTypeParamClause ‘=>’ ColonArgBody ::= indent (CaseClauses | Block) outdent Quoted ::= ‘'’ ‘{’ Block ‘}’ | ‘'’ ‘[’ Type ‘]’

SimpleExpr ::= ‘new’ ConstrApp {with ConstrApp} [TemplateBody] | ‘new’ TemplateBody | BlockExpr | ExprSplice | Quoted | quoteId | SimpleExpr1 [_] SimpleExpr1 ::= literal | xmlLiteral | SimpleRef | ( [ExprsInParens] ) | SimpleExpr . id | SimpleExpr . MatchClause | SimpleExpr (TypeArgs | NamedTypeArgs) | SimpleExpr1 ArgumentExprs | SimpleExpr1 ColonArgument ColonArgument ::= colon [LambdaStart] indent (CaseClauses | Block) outdent LambdaStart ::= FunParams (‘=>’ | ‘?=>’) | HkTypeParamClause ‘=>’ ColonArgBody ::= indent (CaseClauses | Block) outdent Quoted ::= ‘'’ ‘{’ Block ‘}’ | ‘'’ ‘[’ Type ‘]’

Attributes

def simpleExprRest(t: Tree, location: Location, canApply: Boolean): Tree

SimpleLiteral ::= [‘-’] integerLiteral | [‘-’] floatingPointLiteral | booleanLiteral | characterLiteral | stringLiteral

SimpleLiteral ::= [‘-’] integerLiteral | [‘-’] floatingPointLiteral | booleanLiteral | characterLiteral | stringLiteral

Attributes

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

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

Attributes

def simpleRef(): Tree

SimpleRef ::= id | [id ‘.’] ‘this’ | [id ‘.’] ‘super’ [ClassQualifier] ‘.’ id

SimpleRef ::= id | [id ‘.’] ‘this’ | [id ‘.’] ‘super’ [ClassQualifier] ‘.’ id

Attributes

def simpleType(): Tree

SimpleType ::= SimpleLiteral | ‘?’ SubtypeBounds | SimpleType1 | SimpleType ‘(’ Singletons ‘)’ -- under language.experimental.dependent, checked in Typer Singletons ::= Singleton {‘,’ Singleton}

SimpleType ::= SimpleLiteral | ‘?’ SubtypeBounds | SimpleType1 | SimpleType ‘(’ Singletons ‘)’ -- under language.experimental.dependent, checked in Typer Singletons ::= Singleton {‘,’ Singleton}

Attributes

def simpleType1(): Tree

SimpleType1 ::= id | Singleton .' id | Singleton.' type | ‘(’ ArgTypes ‘)’ | Refinement | TypeSplice -- deprecated syntax (since 3.0.0) | SimpleType1 TypeArgs | SimpleType1 `#' id

SimpleType1 ::= id | Singleton .' id | Singleton.' type | ‘(’ ArgTypes ‘)’ | Refinement | TypeSplice -- deprecated syntax (since 3.0.0) | SimpleType1 TypeArgs | SimpleType1 `#' id

Attributes

def singleton(): Tree

Singleton ::= SimpleRef | SimpleLiteral | Singleton ‘.’ id -- not yet | Singleton ‘(’ Singletons ‘)’ -- not yet | Singleton ‘[’ Types ‘]’

Singleton ::= SimpleRef | SimpleLiteral | Singleton ‘.’ id -- not yet | Singleton ‘(’ Singletons ‘)’ -- not yet | Singleton ‘[’ Types ‘]’

Attributes

def skip(): Unit

Skip on error to next safe point.

Skip on error to next safe point.

Attributes

def skipBlanks(idx: Int, step: Int): Int
def splice(isType: Boolean): Tree

ExprSplice ::= ‘$’ spliceId -- if inside quoted block | ‘$’ ‘{’ Block ‘}’ -- unless inside quoted pattern | ‘$’ ‘{’ Pattern ‘}’ -- when inside quoted pattern TypeSplice ::= ‘$’ spliceId -- if inside quoted type | ‘$’ ‘{’ Block ‘}’ -- unless inside quoted type pattern | ‘$’ ‘{’ Pattern ‘}’ -- when inside quoted type pattern

ExprSplice ::= ‘$’ spliceId -- if inside quoted block | ‘$’ ‘{’ Block ‘}’ -- unless inside quoted pattern | ‘$’ ‘{’ Pattern ‘}’ -- when inside quoted pattern TypeSplice ::= ‘$’ spliceId -- if inside quoted type | ‘$’ ‘{’ Block ‘}’ -- unless inside quoted type pattern | ‘$’ ‘{’ Pattern ‘}’ -- when inside quoted type pattern

Attributes

The block in a quote or splice

The block in a quote or splice

Attributes

def startingElimRegion(colonRequired: Boolean): (Offset, Offset)

The region to eliminate when replacing an opening ( or { that ends a line. The ( or { is at in.offset.

The region to eliminate when replacing an opening ( or { that ends a line. The ( or { is at in.offset.

Attributes

def statSepOrEnd[T <: Tree](stats: ListBuffer[T], noPrevStat: Boolean, what: String, altEnd: Token): Boolean

Parse statement separators and end markers. Ensure that there is at least one statement separator unless the next token terminates a statement´sequence.

Parse statement separators and end markers. Ensure that there is at least one statement separator unless the next token terminates a statement´sequence.

Value parameters

altEnd

a token that is also considered as a terminator of the statement sequence (the default EOF already assumes to terminate a statement sequence).

noPrevStat

true if there was no immediately preceding statement parsed

stats

the statements parsed to far

what

a string indicating what kind of statement is parsed

Attributes

Returns

true if the statement sequence continues, false if it terminates.

def subExpr(): Tree[Untyped]
def subPart[T](body: () => T): T

Parse body while checking (under -no-indent) that a { is not missing before it. This is done as follows: If the next token S is indented relative to the current region, and the end of body is followed by a new line and another statement, check that that other statement is indented less than S

Parse body while checking (under -no-indent) that a { is not missing before it. This is done as follows: If the next token S is indented relative to the current region, and the end of body is followed by a new line and another statement, check that that other statement is indented less than S

Attributes

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.

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

Attributes

def syntaxVersionError(option: String, span: Span): Unit
def template(constr: DefDef, isEnum: Boolean): Template

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

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

Attributes

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

TemplateBody ::= [nl] {' TemplateStatSeq}' EnumBody ::= [nl] ‘{’ [SelfType] EnumStat {semi EnumStat} ‘}’

TemplateBody ::= [nl] {' TemplateStatSeq}' EnumBody ::= [nl] ‘{’ [SelfType] EnumStat {semi EnumStat} ‘}’

Attributes

def templateOpt(constr: DefDef): Template

TemplateOpt = [Template]

TemplateOpt = [Template]

Attributes

TemplateStatSeq ::= [SelfType] TemplateStat {semi TemplateStat} TemplateStat ::= Import | Export | Annotations Modifiers Def | Extension | Expr1 | EnumStat ::= TemplateStat | Annotations Modifiers EnumCase

TemplateStatSeq ::= [SelfType] TemplateStat {semi TemplateStat} TemplateStat ::= Import | Export | Annotations Modifiers Def | Extension | Expr1 | EnumStat ::= TemplateStat | Annotations Modifiers EnumCase

Attributes

def termIdent(): Ident

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

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

Attributes

def termParamClause(paramOwner: ParamOwner, numLeadParams: Int, firstClause: Boolean): List[ValDef]

ClsTermParamClause ::= ‘(’ ClsParams ‘)’ | UsingClsTermParamClause UsingClsTermParamClause::= ‘(’ ‘using’ [‘erased’] (ClsParams | ContextTypes) ‘)’ ClsParams ::= ClsParam {‘,’ ClsParam} ClsParam ::= {Annotation} [{Modifier} (‘val’ | ‘var’)] Param

ClsTermParamClause ::= ‘(’ ClsParams ‘)’ | UsingClsTermParamClause UsingClsTermParamClause::= ‘(’ ‘using’ [‘erased’] (ClsParams | ContextTypes) ‘)’ ClsParams ::= ClsParam {‘,’ ClsParam} ClsParam ::= {Annotation} [{Modifier} (‘val’ | ‘var’)] Param

TypelessClause ::= DefTermParamClause | UsingParamClause

DefTermParamClause::= [nl] ‘(’ [DefTermParams] ‘)’ UsingParamClause ::= ‘(’ ‘using’ (DefTermParams | ContextTypes) ‘)’ DefImplicitClause ::= [nl] ‘(’ ‘implicit’ DefTermParams ‘)’ DefTermParams ::= DefTermParam {‘,’ DefTermParam} DefTermParam ::= {Annotation} [‘erased’] [‘inline’] Param

Param ::= id :' ParamType [=' Expr]

Attributes

Returns

the list of parameter definitions

def termParamClauses(paramOwner: ParamOwner, numLeadParams: Int): List[List[ValDef]]

ClsTermParamClauses ::= {ClsTermParamClause} [[nl] ‘(’ [‘implicit’] ClsParams ‘)’] TypelessClauses ::= TypelessClause {TypelessClause}

ClsTermParamClauses ::= {ClsTermParamClause} [[nl] ‘(’ [‘implicit’] ClsParams ‘)’] TypelessClauses ::= TypelessClause {TypelessClause}

Attributes

Returns

The parameter definitions

def testChar(idx: Int, p: Char => Boolean): Boolean
def testChar(idx: Int, c: Char): Boolean
def testChars(from: Int, str: String): Boolean
def tmplDef(start: Int, mods: Modifiers): Tree

TmplDef ::= ([‘case’] ‘class’ | ‘trait’) ClassDef | [‘case’] ‘object’ ObjectDef | ‘enum’ EnumDef | ‘given’ GivenDef

TmplDef ::= ([‘case’] ‘class’ | ‘trait’) ClassDef | [‘case’] ‘object’ ObjectDef | ‘enum’ EnumDef | ‘given’ GivenDef

Attributes

def toBeContinued(altToken: Token): Boolean

Does the current conditional expression continue after the initially parsed (...) region?

Does the current conditional expression continue after the initially parsed (...) region?

Attributes

def topStatSeq(outermost: Boolean): List[Tree]

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

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

Attributes

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.

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

Attributes

def typ(): Tree

Type ::= FunType | HkTypeParamClause ‘=>>’ Type | FunParamClause ‘=>>’ Type | MatchType | InfixType FunType ::= (MonoFunType | PolyFunType) MonoFunType ::= FunTypeArgs (‘=>’ | ‘?=>’) Type | (‘->’ | ‘?->’ ) [CaptureSet] Type -- under pureFunctions PolyFunType ::= HKTypeParamClause '=>' Type | HKTypeParamClause ‘->’ [CaptureSet] Type -- under pureFunctions FunTypeArgs ::= InfixType | (' [ FunArgType {,' FunArgType } ] )' | '(' [ TypedFunParam {',' TypedFunParam } ')' MatchType ::= InfixTypematch` <<< TypeCaseClauses >>>

Type ::= FunType | HkTypeParamClause ‘=>>’ Type | FunParamClause ‘=>>’ Type | MatchType | InfixType FunType ::= (MonoFunType | PolyFunType) MonoFunType ::= FunTypeArgs (‘=>’ | ‘?=>’) Type | (‘->’ | ‘?->’ ) [CaptureSet] Type -- under pureFunctions PolyFunType ::= HKTypeParamClause '=>' Type | HKTypeParamClause ‘->’ [CaptureSet] Type -- under pureFunctions FunTypeArgs ::= InfixType | (' [ FunArgType {,' FunArgType } ] )' | '(' [ TypedFunParam {',' TypedFunParam } ')' MatchType ::= InfixTypematch` <<< TypeCaseClauses >>>

Attributes

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

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

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

Attributes

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

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

Attributes

TypeCaseClause ::= ‘case’ (InfixType | ‘_’) ‘=>’ Type [semi]

TypeCaseClause ::= ‘case’ (InfixType | ‘_’) ‘=>’ Type [semi]

Attributes

def typeDefOrDcl(start: Offset, mods: Modifiers): Tree

TypeDef ::= id [TypeParamClause] {FunParamClause} TypeBounds [‘=’ Type]

TypeDef ::= id [TypeParamClause] {FunParamClause} TypeBounds [‘=’ Type]

Attributes

def typeDependingOn(location: Location): Tree
def typeIdent(): Ident

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

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

Attributes

def typeOrTermParamClauses(paramOwner: ParamOwner, numLeadParams: Int): List[List[TypeDef] | List[ValDef]]

DefParamClauses ::= DefParamClause { DefParamClause } -- and two DefTypeParamClause cannot be adjacent DefParamClause ::= DefTypeParamClause | DefTermParamClause | UsingParamClause

DefParamClauses ::= DefParamClause { DefParamClause } -- and two DefTypeParamClause cannot be adjacent DefParamClause ::= DefTypeParamClause | DefTermParamClause | UsingParamClause

Attributes

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

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

Attributes

def typeParamClause(paramOwner: ParamOwner): List[TypeDef]

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

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

DefTypeParamClause::= ‘[’ DefTypeParam {‘,’ DefTypeParam} ‘]’ DefTypeParam ::= {Annotation} [sealed] -- under captureChecking id [HkTypeParamClause] TypeParamBounds

TypTypeParamClause::= ‘[’ TypTypeParam {‘,’ TypTypeParam} ‘]’ TypTypeParam ::= {Annotation} id [HkTypePamClause] TypeBounds

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

Attributes

def typedFunParam(start: Offset, name: TermName, mods: Modifiers): ValDef

TypedFunParam ::= [erased] id ':' Type

TypedFunParam ::= [erased] id ':' Type

Attributes

def typedOpt(): Tree
def warning(msg: Message, offset: Int): Unit
def widenIfWholeLine(span: Span): Span

If all other characters on the same line as span are blanks, widen to the whole line.

If all other characters on the same line as span are blanks, widen to the whole line.

Attributes

{withConstrApp} but no EOL allowed afterwith`.

{withConstrApp} but no EOL allowed afterwith`.

Attributes

def withTemplate(constr: DefDef, parents: List[Tree]): Template

with Template, with EOL interpreted

with Template, with EOL interpreted

Attributes

def withType(): Tree

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

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

Attributes

def withinStaged[T](kind: StageKind)(op: => T): T
def wrapNew(tpt: Tree): Select

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

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

Attributes

def xmlLiteral(): Tree

Inherited methods

def atSpan[T <: Positioned](start: Offset)(t: T): T

Attributes

Inherited from:
ParserCommon
def atSpan[T <: Positioned](start: Offset, point: Offset)(t: T): T

If the last read offset is strictly greater than start, assign tree the span from start to last read offset, with given point. If the last offset is less than or equal to start, the tree t did not consume any source for its construction. In this case, don't assign a span yet, but wait for its span to be determined by setChildSpans when the parent node is positioned.

If the last read offset is strictly greater than start, assign tree the span from start to last read offset, with given point. If the last offset is less than or equal to start, the tree t did not consume any source for its construction. In this case, don't assign a span yet, but wait for its span to be determined by setChildSpans when the parent node is positioned.

Attributes

Inherited from:
ParserCommon
def atSpan[T <: Positioned](start: Offset, point: Offset, end: Offset)(t: T): T

Attributes

Inherited from:
ParserCommon
def atSpan[T <: Positioned](span: Span)(t: T): T

Positions tree. If t does not have a span yet, set its span to the given one.

Positions tree. If t does not have a span yet, set its span to the given one.

Attributes

Inherited from:
ParserCommon

Attributes

Inherited from:
ParserCommon

in.offset, except if this is at a new line, in which case lastOffset is preferred.

in.offset, except if this is at a new line, in which case lastOffset is preferred.

Attributes

Inherited from:
ParserCommon

Attributes

Inherited from:
ParserCommon

Attributes

Inherited from:
ParserCommon

Attributes

Inherited from:
ParserCommon
def syntaxError(msg: Message, span: Span): Unit

Unconditionally issue an error at given span, without updating lastErrorOffset.

Unconditionally issue an error at given span, without updating lastErrorOffset.

Attributes

Inherited from:
ParserCommon
def syntaxError(msg: Message, offset: Int): Unit

Issue an error at given offset if beyond last error offset and update lastErrorOffset.

Issue an error at given offset if beyond last error offset and update lastErrorOffset.

Attributes

Inherited from:
ParserCommon

Attributes

Inherited from:
ParserCommon

Concrete fields

val argumentExpr: () => Tree
val constrApp: () => Tree

ConstrApp ::= SimpleType1 {Annotation} {ParArgumentExprs}

ConstrApp ::= SimpleType1 {Annotation} {ParArgumentExprs}

Attributes

val constrExpr: () => Tree

ConstrExpr ::= SelfInvocation | {' SelfInvocation {semi BlockStat}}'

ConstrExpr ::= SelfInvocation | {' SelfInvocation {semi BlockStat}}'

Attributes

val expr: () => Tree
val exprInParens: () => Tree

Expr ::= [implicit'] FunParams (‘=>’ | ‘?=>’) Expr | HkTypeParamClause ‘=>’ Expr | Expr1 FunParams ::= Bindings | id |' ExprInParens ::= PostfixExpr :' Type | Expr BlockResult ::= [‘implicit’] FunParams (‘=>’ | ‘?=>’) Block | HkTypeParamClause ‘=>’ Block | Expr1 Expr1 ::= [‘inline’]if' (' Expr)' {nl} Expr [[semi] else Expr] | [‘inline’] if' Exprthen' Expr [[semi] else Expr] | while'(' Expr )' {nl} Expr |while' Expr do' Expr |try' Expr Catches [finally' Expr] |try' Expr [finally' Expr] |throw' Expr | return' [Expr] | ForExpr | [SimpleExpr.'] id =' Expr | PrefixOperator SimpleExpr=' Expr | SimpleExpr1 ArgumentExprs =' Expr | PostfixExpr [Ascription] | ‘inline’ InfixExpr MatchClause Bindings ::=(' [Binding {,' Binding}])' Binding ::= (id | _') [:' Type] Ascription ::= :' InfixType |:' Annotation {Annotation} | :'' `*' Catches ::= ‘catch’ (Expr | ExprCaseClause)

Expr ::= [implicit'] FunParams (‘=>’ | ‘?=>’) Expr | HkTypeParamClause ‘=>’ Expr | Expr1 FunParams ::= Bindings | id |' ExprInParens ::= PostfixExpr :' Type | Expr BlockResult ::= [‘implicit’] FunParams (‘=>’ | ‘?=>’) Block | HkTypeParamClause ‘=>’ Block | Expr1 Expr1 ::= [‘inline’]if' (' Expr)' {nl} Expr [[semi] else Expr] | [‘inline’] if' Exprthen' Expr [[semi] else Expr] | while'(' Expr )' {nl} Expr |while' Expr do' Expr |try' Expr Catches [finally' Expr] |try' Expr [finally' Expr] |throw' Expr | return' [Expr] | ForExpr | [SimpleExpr.'] id =' Expr | PrefixOperator SimpleExpr=' Expr | SimpleExpr1 ArgumentExprs =' Expr | PostfixExpr [Ascription] | ‘inline’ InfixExpr MatchClause Bindings ::=(' [Binding {,' Binding}])' Binding ::= (id | _') [:' Type] Ascription ::= :' InfixType |:' Annotation {Annotation} | :'' `*' Catches ::= ‘catch’ (Expr | ExprCaseClause)

Attributes

val funArgType: () => Tree

FunArgType ::= Type | =>' Type |->' [CaptureSet] Type

FunArgType ::= Type | =>' Type |->' [CaptureSet] Type

Attributes

val in: Scanner
val pattern2: () => Tree

Pattern2 ::= [id `@'] Pattern3

Pattern2 ::= [id `@'] Pattern3

Attributes

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

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

Attributes

The last offset where a colon at the end of line would be required if a subsequent { ... } block would be converted to an indentation region.

The last offset where a colon at the end of line would be required if a subsequent { ... } block would be converted to an indentation region.

Attributes

PrefixExpr ::= [PrefixOperator'] SimpleExpr PrefixOperator ::= ‘-’ | ‘+’ | ‘~’ | ‘!’ (if not backquoted)

PrefixExpr ::= [PrefixOperator'] SimpleExpr PrefixOperator ::= ‘-’ | ‘+’ | ‘~’ | ‘!’ (if not backquoted)

Attributes

RefinedType ::= WithType {[nl] Refinement} [^ CaptureSet]

RefinedType ::= WithType {[nl] Refinement} [^ CaptureSet]

Attributes

lazy val xmlp: MarkupParser

The markup parser. The first time this lazy val is accessed, we assume we were trying to parse an XML literal. The current position is recorded for later error reporting if it turns out that we don't have scala-xml on the compilation classpath.

The markup parser. The first time this lazy val is accessed, we assume we were trying to parse an XML literal. The current position is recorded for later error reporting if it turns out that we don't have scala-xml on the compilation classpath.

Attributes

Inherited fields

protected var lastErrorOffset: Int

The offset where the last syntax error was reported, or if a skip to a safepoint occurred afterwards, the offset of the safe point.

The offset where the last syntax error was reported, or if a skip to a safepoint occurred afterwards, the offset of the safe point.

Attributes

Inherited from:
ParserCommon