ScriptParser

class ScriptParser(source: SourceFile)(using x$2: Context) extends Parser
class Parser
class Object
trait Matchable
class Any

Type members

Inherited classlikes

Inherited from:
Parser

Inherited types

Inherited from:
Parser

Value members

Concrete methods

override def parse(): Tree

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

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

Definition Classes

Inherited methods

def accept(name: Name): Int
Inherited from:
Parser
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.

Returns:

The offset at the start of the token to accept

Inherited from:
Parser
Inherited from:
Parser

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

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

Inherited from:
Parser

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

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

Inherited from:
Parser
def addFlag(mods: Modifiers, flag: FlagSet): Modifiers
Inherited from:
Parser
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

Inherited from:
Parser
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

Inherited from:
Parser
def annot(): Tree

Annotation ::= `@' SimpleType1 {ParArgumentExprs}

Annotation ::= `@' SimpleType1 {ParArgumentExprs}

Inherited from:
Parser

AnnotType ::= SimpleType {Annotation}

AnnotType ::= SimpleType {Annotation}

Inherited from:
Parser
Inherited from:
Parser
def annotations(skipNewLines: Boolean): List[Tree]
Inherited from:
Parser
def annotsAsMods(skipNewLines: Boolean): Modifiers
Inherited from:
Parser
def applyToClosure(t: Tree, start: Offset, params: List[ValDef]): Tree
Inherited from:
Parser
def argTypes(namedOK: Boolean, wildOK: Boolean): List[Tree]

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

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

Inherited from:
Parser

ArgumentExprs ::= ParArgumentExprs | [nl] BlockExpr

ArgumentExprs ::= ParArgumentExprs | [nl] BlockExpr

Inherited from:
Parser

ArgumentExprss ::= {ArgumentExprs}

ArgumentExprss ::= {ArgumentExprs}

Inherited from:
Parser

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

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

Inherited from:
Parser
Inherited from:
Parser
def ascription(t: Tree, location: Location): Tree
Inherited from:
Parser
def atSpan[T <: Positioned](start: Offset)(t: T): T
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.

Inherited from:
ParserCommon
def atSpan[T <: Positioned](start: Offset, point: Offset, end: Offset)(t: T): T
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.

Inherited from:
ParserCommon
def binding(mods: Modifiers): Tree

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

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

Inherited from:
Parser
Inherited from:
Parser
def block(simplify: Boolean): Tree

Block ::= BlockStatSeq

Block ::= BlockStatSeq

Note:

Return tree does not have a defined span.

Inherited from:
Parser

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

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

Inherited from:
Parser

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 |

Inherited from:
Parser
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).
Inherited from:
Parser
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

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

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

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

Inherited from:
Parser

[`extends' ConstrApps]

[`extends' ConstrApps]

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

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.

Inherited from:
Parser
def checkNoEscapingPlaceholders[T](op: => T): T
Inherited from:
Parser
def classConstr(isCaseClass: Boolean): DefDef

ClassConstr ::= [ClsTypeParamClause] [ConstrMods] ClsParamClauses

ClassConstr ::= [ClsTypeParamClause] [ConstrMods] ClsParamClauses

Inherited from:
Parser
def classDef(start: Offset, mods: Modifiers): TypeDef

ClassDef ::= id ClassConstr TemplateOpt

ClassDef ::= id ClassConstr TemplateOpt

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

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.

Inherited from:
Parser
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

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

CompilationUnit ::= {package QualId semi} TopStatSeq

CompilationUnit ::= {package QualId semi} TopStatSeq

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

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

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

Inherited from:
Parser

ConstrMods ::= {Annotation} [AccessModifier]

ConstrMods ::= {Annotation} [AccessModifier]

Inherited from:
Parser
Inherited from:
Parser
def contextTypes(ofClass: Boolean, nparams: Int, impliedMods: Modifiers): List[ValDef]

ContextTypes ::= FunArgType {‘,’ FunArgType}

ContextTypes ::= FunArgType {‘,’ FunArgType}

Inherited from:
Parser
def convertToParam(tree: Tree, mods: Modifiers, expected: String): ValDef

Convert tree to formal parameter

Convert tree to formal parameter

Inherited from:
Parser

Convert tree to formal parameter list

Convert tree to formal parameter list

Inherited from:
Parser

Convert (qual)ident to type identifier

Convert (qual)ident to type identifier

Inherited from:
Parser
Inherited from:
Parser
def defDefOrDcl(start: Offset, mods: Modifiers, numLeadParams: Int): DefDef

DefDef ::= DefSig [‘:’ Type] ‘=’ Expr | this ParamClause ParamClauses =' ConstrExpr DefDcl ::= DefSig:' Type DefSig ::= id [DefTypeParamClause] DefParamClauses | ExtParamClause [nl] [‘.’] id DefParamClauses

DefDef ::= DefSig [‘:’ Type] ‘=’ Expr | this ParamClause ParamClauses =' ConstrExpr DefDcl ::= DefSig:' Type DefSig ::= id [DefTypeParamClause] DefParamClauses | ExtParamClause [nl] [‘.’] id DefParamClauses

Inherited from:
Parser
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 ::= 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)

Inherited from:
Parser
def deprecationWarning(msg: Message, offset: Int): Unit
Inherited from:
Parser

DotSelectors ::= { `.' id }

DotSelectors ::= { `.' id }

Inherited from:
Parser
def dropParensOrBraces(start: Offset, endStr: String): Unit

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

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

Inherited from:
Parser

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

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

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

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

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

Inherited from:
Parser
def enumDef(start: Offset, mods: Modifiers): TypeDef

EnumDef ::= id ClassConstr InheritClauses EnumBody

EnumDef ::= id ClassConstr InheritClauses EnumBody

Inherited from:
Parser

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

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

Inherited from:
Parser

Enumerators ::= Generator {semi Enumerator | Guard}

Enumerators ::= Generator {semi Enumerator | Guard}

Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser

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.

Inherited from:
ParserCommon
def expr(location: Location): Tree
Inherited from:
Parser
def expr1(location: Location): Tree
Inherited from:
Parser
def expr1Rest(t: Tree, location: Location): Tree
Inherited from:
Parser

ExprsInParens ::= ExprInParens {`,' ExprInParens}

ExprsInParens ::= ExprInParens {`,' ExprInParens}

Inherited from:
Parser
def extMethod(numLeadParams: Int): DefDef

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

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

Inherited from:
Parser
def extMethods(numLeadParams: Int): List[DefDef]

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

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

Inherited from:
Parser

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

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

Inherited from:
Parser
Inherited from:
Parser

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.

Inherited from:
Parser

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?
Inherited from:
Parser

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

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

Inherited from:
Parser
Inherited from:
Parser

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 :?

Inherited from:
Parser

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

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

Inherited from:
Parser
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

Inherited from:
Parser

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

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

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

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

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

Inherited from:
Parser

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

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

Inherited from:
Parser
def generatorRest(pat: Tree, casePat: Boolean): GenFrom
Inherited from:
Parser
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} ‘:’

Inherited from:
Parser
def guard(): Tree

Guard ::= if PostfixExpr

Guard ::= if PostfixExpr

Inherited from:
Parser

Accept identifier and return its name as a term name.

Accept identifier and return its name as a term name.

Inherited from:
Parser
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]

Inherited from:
Parser
def importClause(leading: Token, mkTree: ImportConstr): List[Tree]

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

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

Inherited from:
Parser
def importExpr(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]

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

Issue an error at current offset that input is incomplete

Issue an error at current offset that input is incomplete

Inherited from:
Parser
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

Inherited from:
Parser
def infixOps(first: Tree, canStartOperand: Token => Boolean, operand: Location => Tree, location: Location, isType: Boolean, isOperator: => Boolean, maybePostfix: 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.

Inherited from:
Parser

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

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

Inherited from:
Parser

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

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

Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser
def isDefIntro(allowedMods: BitSet, excludedSoftModifiers: Set[TermName]): Boolean
Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser
def isIdent(name: Name): Boolean
Inherited from:
Parser
Inherited from:
Parser
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.

Inherited from:
Parser
Inherited from:
Parser

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)?

Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser

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

Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser
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.

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

Create a tree representing a packaging

Create a tree representing a packaging

Inherited from:
Parser

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

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

Inherited from:
Parser

match'{' TypeCaseClauses `}'

match'{' TypeCaseClauses `}'

Inherited from:
Parser

MixinQualifier ::= [' id]'

MixinQualifier ::= [' id]'

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

Create an import node and handle source version imports

Create an import node and handle source version imports

Inherited from:
Parser
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 | erased | inline | transparent

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

Inherited from:
Parser
Inherited from:
Parser
Inherited from:
ParserCommon
def newExpr(): Tree

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

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

Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser
def objectDef(start: Offset, mods: Modifiers): ModuleDef

ObjectDef ::= id TemplateOpt

ObjectDef ::= id TemplateOpt

Inherited from:
Parser
def packaging(start: Int): Tree

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

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

Inherited from:
Parser

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

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

Inherited from:
Parser

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.

Inherited from:
Parser
def paramClause(nparams: Int, ofClass: Boolean, ofCaseClass: Boolean, prefix: Boolean, givenOnly: Boolean, firstClause: Boolean): List[ValDef]

ClsParamClause ::= ‘(’ [‘erased’] ClsParams ‘)’ | UsingClsParamClause UsingClsParamClause::= ‘(’ ‘using’ [‘erased’] (ClsParams | ContextTypes) ‘)’ ClsParams ::= ClsParam {‘,’ ClsParam} ClsParam ::= {Annotation}

ClsParamClause ::= ‘(’ [‘erased’] ClsParams ‘)’ | UsingClsParamClause UsingClsParamClause::= ‘(’ ‘using’ [‘erased’] (ClsParams | ContextTypes) ‘)’ ClsParams ::= ClsParam {‘,’ ClsParam} ClsParam ::= {Annotation}

DefParamClause ::= ‘(’ [‘erased’] DefParams ‘)’ | UsingParamClause UsingParamClause ::= ‘(’ ‘using’ [‘erased’] (DefParams | ContextTypes) ‘)’ DefParams ::= DefParam {‘,’ DefParam} DefParam ::= {Annotation} [‘inline’] Param

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

Returns:

the list of parameter definitions

Inherited from:
Parser
def paramClauses(ofClass: Boolean, ofCaseClass: Boolean, givenOnly: Boolean, numLeadParams: Int): List[List[ValDef]]

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

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

Returns:

The parameter definitions

Inherited from:
Parser

ParamType ::= [`=>'] ParamValueType

ParamType ::= [`=>'] ParamValueType

Inherited from:
Parser

ParamValueType ::= Type [`*']

ParamValueType ::= Type [`*']

Inherited from:
Parser
def patDefOrDcl(start: Offset, mods: Modifiers): Tree

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

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

Inherited from:
Parser
def pattern(location: Location): Tree

Pattern ::= Pattern1 { `|' Pattern1 }

Pattern ::= Pattern1 { `|' Pattern1 }

Inherited from:
Parser
def pattern1(location: Location): Tree

Pattern1 ::= Pattern2 [Ascription]

Pattern1 ::= Pattern2 [Ascription]

Inherited from:
Parser
def pattern3(): Tree

Pattern3 ::= InfixPattern | PatVar ‘*’

Pattern3 ::= InfixPattern | PatVar ‘*’

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

Patterns ::= Pattern [`,' Pattern]

Patterns ::= Pattern [`,' Pattern]

Inherited from:
Parser
def patternsOpt(location: Location): List[Tree]
Inherited from:
Parser
Inherited from:
ParserCommon
Inherited from:
Parser
def postfixExpr(location: Location): Tree

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

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

Inherited from:
Parser
def postfixExprRest(t: Tree, location: Location): Tree
Inherited from:
Parser
def qualId(): Tree

QualId ::= id {`.' id}

QualId ::= id {`.' id}

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

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)

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)

Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser
def refinement(indentOK: Boolean): List[Tree]

Refinement ::= {' RefineStatSeq}'

Refinement ::= {' RefineStatSeq}'

Inherited from:
Parser
def rejectWildcardType(t: Tree, fallbackTree: Tree): Tree
Inherited from:
Parser

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

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

Inherited from:
Parser
def rewriteNotice(version: String, additionalOption: String): String
Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser
def selector(t: Tree): Tree
Inherited from:
Parser

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

Inherited from:
Parser

SelfInvocation ::= this ArgumentExprs {ArgumentExprs}

SelfInvocation ::= this ArgumentExprs {ArgumentExprs}

Inherited from:
Parser
def simpleExpr(location: Location): Tree

SimpleExpr ::= ‘new’ ConstrApp {with ConstrApp} [TemplateBody] | ‘new’ TemplateBody | BlockExpr | ‘$’ ‘{’ Block ‘}’ | Quoted | quoteId | SimpleExpr1 [_] SimpleExpr1 ::= literal | xmlLiteral | SimpleRef | ( [ExprsInParens] ) | SimpleExpr . id | SimpleExpr . MatchClause | SimpleExpr (TypeArgs | NamedTypeArgs) | SimpleExpr1 ArgumentExprs | SimpleExpr1 : IndentedExpr -- under language.experimental.fewerBraces | SimpleExpr1 FunParams (‘=>’ | ‘?=>’) IndentedExpr -- under language.experimental.fewerBraces IndentedExpr ::= indent (CaseClauses | Block) outdent Quoted ::= ‘'’ ‘{’ Block ‘}’ | ‘'’ ‘[’ Type ‘]’

SimpleExpr ::= ‘new’ ConstrApp {with ConstrApp} [TemplateBody] | ‘new’ TemplateBody | BlockExpr | ‘$’ ‘{’ Block ‘}’ | Quoted | quoteId | SimpleExpr1 [_] SimpleExpr1 ::= literal | xmlLiteral | SimpleRef | ( [ExprsInParens] ) | SimpleExpr . id | SimpleExpr . MatchClause | SimpleExpr (TypeArgs | NamedTypeArgs) | SimpleExpr1 ArgumentExprs | SimpleExpr1 : IndentedExpr -- under language.experimental.fewerBraces | SimpleExpr1 FunParams (‘=>’ | ‘?=>’) IndentedExpr -- under language.experimental.fewerBraces IndentedExpr ::= indent (CaseClauses | Block) outdent Quoted ::= ‘'’ ‘{’ Block ‘}’ | ‘'’ ‘[’ Type ‘]’

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

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

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

Inherited from:
Parser

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 |_'

Inherited from:
Parser
Inherited from:
Parser

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

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

Inherited from:
Parser

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

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

Inherited from:
Parser

SimpleType1 ::= id | Singleton .' id | Singleton.' type | ‘(’ ArgTypes ‘)’ | Refinement | ‘$’ ‘{’ Block ‘}’ | SimpleType1 TypeArgs | SimpleType1 `#' id

SimpleType1 ::= id | Singleton .' id | Singleton.' type | ‘(’ ArgTypes ‘)’ | Refinement | ‘$’ ‘{’ Block ‘}’ | SimpleType1 TypeArgs | SimpleType1 `#' id

Inherited from:
Parser

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 ‘]’

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

SimpleExpr ::= spliceId | ‘$’ ‘{’ Block ‘}’) unless inside quoted pattern SimpleType ::= spliceId | ‘$’ ‘{’ Block ‘}’) unless inside quoted pattern

SimpleExpr ::= spliceId | ‘$’ ‘{’ Block ‘}’) unless inside quoted pattern SimpleType ::= spliceId | ‘$’ ‘{’ Block ‘}’) unless inside quoted pattern

SimpleExpr ::= spliceId | ‘$’ ‘{’ Pattern ‘}’) when inside quoted pattern SimpleType ::= spliceId | ‘$’ ‘{’ Pattern ‘}’) when inside quoted pattern

Inherited from:
Parser

The block in a quote or splice

The block in a quote or splice

Inherited from:
Parser
Inherited from:
ParserCommon
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.

Inherited from:
Parser
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

Returns:

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

Inherited from:
Parser
Inherited from:
Parser
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

Inherited from:
Parser
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.

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.

Inherited from:
ParserCommon

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.

Inherited from:
Parser
def syntaxVersionError(option: String, span: Span): Unit
Inherited from:
Parser
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}]

Inherited from:
Parser
def templateBody(rewriteWithColon: Boolean): (ValDef, List[Tree])
Inherited from:
Parser
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} ‘}’

Inherited from:
Parser

TemplateOpt = [Template]

TemplateOpt = [Template]

Inherited from:
Parser

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

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

Inherited from:
Parser

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

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

Inherited from:
Parser
def testChar(idx: Int, c: Char): Boolean
Inherited from:
Parser
def testChar(idx: Int, p: Char => Boolean): Boolean
Inherited from:
Parser
def testChars(from: Int, str: String): Boolean
Inherited from:
Parser
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

Inherited from:
Parser
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?

Inherited from:
Parser
def tokenSeparated[T](separator: Int, part: () => T): List[T]

part { separator part }

part { separator part }

Inherited from:
Parser
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 |

Inherited from:
Parser

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.

Inherited from:
Parser
def typ(): Tree

Type ::= FunType | HkTypeParamClause ‘=>>’ Type | FunParamClause ‘=>>’ Type | MatchType | InfixType FunType ::= (MonoFunType | PolyFunType) MonoFunType ::= FunTypeArgs (‘=>’ | ‘?=>’) Type PolyFunType ::= HKTypeParamClause '=>' Type FunTypeArgs ::= InfixType | (' [ [ ‘[using]’ ‘['erased'] FunArgType {,' FunArgType } ] `)' | '(' [ ‘[using]’ ‘['erased'] TypedFunParam {',' TypedFunParam } ')'

Type ::= FunType | HkTypeParamClause ‘=>>’ Type | FunParamClause ‘=>>’ Type | MatchType | InfixType FunType ::= (MonoFunType | PolyFunType) MonoFunType ::= FunTypeArgs (‘=>’ | ‘?=>’) Type PolyFunType ::= HKTypeParamClause '=>' Type FunTypeArgs ::= InfixType | (' [ [ ‘[using]’ ‘['erased'] FunArgType {,' FunArgType } ] `)' | '(' [ ‘[using]’ ‘['erased'] TypedFunParam {',' TypedFunParam } ')'

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

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

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

Inherited from:
Parser

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

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

Inherited from:
Parser

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

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

Inherited from:
Parser
def typeDefOrDcl(start: Offset, mods: Modifiers): Tree

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

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

Inherited from:
Parser
def typeDependingOn(location: Location): Tree
Inherited from:
Parser

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

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

Inherited from:
Parser

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

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

Inherited from:
Parser
def typeParamClause(ownerKind: Value): List[TypeDef]

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

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

DefTypeParamClause::= ‘[’ DefTypeParam {‘,’ DefTypeParam} ‘]’ DefTypeParam ::= {Annotation} id [HkTypeParamClause] TypeParamBounds

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

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

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

TypedFunParam ::= id ':' Type

TypedFunParam ::= id ':' Type

Inherited from:
Parser
def typedOpt(): Tree
Inherited from:
Parser
Inherited from:
ParserCommon
def warning(msg: Message, offset: Int): Unit
Inherited from:
Parser
def warning(msg: Message, sourcePos: SourcePosition): Unit
Inherited from:
Parser

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.

Inherited from:
Parser
Inherited from:
Parser

{withConstrApp} but no EOL allowed afterwith`.

{withConstrApp} but no EOL allowed afterwith`.

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

with Template, with EOL interpreted

with Template, with EOL interpreted

Inherited from:
Parser
def withType(): Tree

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

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

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

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

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

Inherited from:
Parser
Inherited from:
Parser
Inherited from:
Parser

Inherited fields

val argumentExpr: () => Tree
Inherited from:
Parser
val constrApp: () => Tree

ConstrApp ::= SimpleType1 {Annotation} {ParArgumentExprs}

ConstrApp ::= SimpleType1 {Annotation} {ParArgumentExprs}

Inherited from:
Parser
val constrExpr: () => Tree

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

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

Inherited from:
Parser
val expr: () => Tree
Inherited from:
Parser
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)

Inherited from:
Parser
val funArgType: () => Tree

FunArgType ::= Type | `=>' Type

FunArgType ::= Type | `=>' Type

Inherited from:
Parser
val in: Scanner
Inherited from:
Parser
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.

Inherited from:
ParserCommon
Inherited from:
Parser
val pattern2: () => Tree

Pattern2 ::= [id `@'] Pattern3

Pattern2 ::= [id `@'] Pattern3

Inherited from:
Parser

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.

Inherited from:
Parser

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.

Inherited from:
Parser

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

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

Inherited from:
Parser

RefinedType ::= WithType {[nl] Refinement}

RefinedType ::= WithType {[nl] Refinement}

Inherited from:
Parser
Inherited from:
Parser
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.

Inherited from:
Parser