dotty.tools.dotc.parsing.Parsers

Parser

Related Doc: package Parsers

class Parser extends ParserCommon

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Parser
  2. ParserCommon
  3. DotClass
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Parser(source: SourceFile)(implicit ctx: Context)

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. 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

  5. def acceptStatSep(): Unit

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

  6. def acceptStatSepUnlessAtEnd(altEnd: Token = EOF): Unit

  7. def accessQualifierOpt(mods: Modifiers): Modifiers

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

  8. def addFlag(mods: Modifiers, flag: FlagSet): Modifiers

  9. def addMod(mods: Modifiers, mod: Mod): Modifiers

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

  10. def adjustStart(start: Offset)(tree: ast.untpd.Tree): ast.untpd.Tree

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

  11. def annot(): ast.untpd.Tree

    Annotation ::= @' SimpleType {ParArgumentExprs}

  12. def annotType(): ast.untpd.Tree

    AnnotType ::= SimpleType {Annotation}

  13. def annotTypeRest(t: ast.untpd.Tree): ast.untpd.Tree

  14. def annotations(skipNewLines: Boolean = false): List[ast.untpd.Tree]

  15. def annotsAsMods(skipNewLines: Boolean = false): Modifiers

  16. def argTypes(namedOK: Boolean = false): List[ast.untpd.Tree]

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

  17. val argumentExpr: () ⇒ ast.untpd.Tree

  18. def argumentExprs(): List[ast.untpd.Tree]

    ArgumentExprs ::= ParArgumentExprs | [nl] BlockExpr

  19. def argumentExprss(fn: ast.untpd.Tree): ast.untpd.Tree

    ArgumentExprss ::= {ArgumentExprs}

  20. def argumentPatterns(): List[ast.untpd.Tree]

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

  21. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  22. def ascription(t: ast.untpd.Tree, location: Location.Value): ast.untpd.Tree

  23. def atPos[T <: Positioned](start: Offset)(t: T): T

    Definition Classes
    ParserCommon
  24. def atPos[T <: Positioned](start: Offset, point: Offset)(t: T): T

    If the last read offset is strictly greater than start, position tree to position spanning from start to last read offset, with given point.

    If the last read offset is strictly greater than start, position tree to position spanning 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 position it yet, but wait for its position to be determined by setChildPositions when the parent node is positioned.

    Definition Classes
    ParserCommon
  25. def atPos[T <: Positioned](start: Offset, point: Offset, end: Offset)(t: T): T

    Definition Classes
    ParserCommon
  26. def atPos[T <: Positioned](pos: Position)(t: T): T

    Positions tree.

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

    Definition Classes
    ParserCommon
  27. def block(): ast.untpd.Tree

    Block ::= BlockStatSeq

    Block ::= BlockStatSeq

    Note

    Return tree does not carry source position.

  28. def blockExpr(): ast.untpd.Tree

    BlockExpr ::= {' (CaseClauses | Block) }'

  29. def blockStatSeq(): List[ast.untpd.Tree]

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

  30. def caseClause(): ast.untpd.CaseDef

    CaseClause ::= case Pattern [Guard] =>' Block

  31. def caseClauses(): List[ast.untpd.CaseDef]

    CaseClauses ::= CaseClause {CaseClause}

  32. def checkAssoc(offset: Int, op: Name, leftAssoc: Boolean): Unit

  33. def checkNoEscapingPlaceholders[T](op: ⇒ T): T

  34. def classDef(start: Offset, mods: Modifiers, docstring: Option[Comment]): ast.untpd.TypeDef

    ClassDef ::= Id [ClsTypeParamClause] [ConstrMods] ClsParamClauses TemplateOpt

  35. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. def closureRest(start: Int, location: Location.Value, params: List[ast.untpd.Tree]): ast.untpd.Tree

  37. def commaSeparated[T](part: () ⇒ T): List[T]

  38. def compilationUnit(): ast.untpd.Tree

    CompilationUnit ::= {package QualId semi} TopStatSeq

  39. def condExpr(altToken: Token): ast.untpd.Tree

  40. val constrApp: () ⇒ ast.untpd.Tree

    ConstrApp ::= SimpleType {ParArgumentExprs}

  41. def constrBlock(): ast.untpd.Tree

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

  42. def constrExpr(): ast.untpd.Tree

    ConstrExpr ::= SelfInvocation | ConstrBlock

  43. def constrModsOpt(): Modifiers

    ConstrMods ::= AccessModifier | Annotation {Annotation} (AccessModifier | this')

  44. def contextBounds(pname: TypeName): List[ast.untpd.Tree]

  45. def convertToParam(tree: ast.untpd.Tree, mods: Modifiers = Modifiers(), expected: String = "formal parameter"): ast.untpd.ValDef

    Convert tree to formal parameter

  46. def convertToParams(tree: ast.untpd.Tree): List[ast.untpd.ValDef]

    Convert tree to formal parameter list

  47. def convertToTypeId(tree: ast.untpd.Tree): ast.untpd.Tree

    Convert (qual)ident to type identifier

  48. def defAnnotsMods(allowed: BitSet): Modifiers

  49. def defDefOrDcl(start: Offset, mods: Modifiers, docstring: Option[Comment] = None): ast.untpd.Tree

    DefDef ::= DefSig (:' Type [=' Expr] | "=" Expr) | this ParamClause ParamClauses =' ConstrExpr DefDcl ::= DefSig :' Type DefSig ::= id [DefTypeParamClause] ParamClauses

  50. def defOrDcl(start: Int, mods: Modifiers): ast.untpd.Tree

    Def ::= val PatDef | var VarDef | def DefDef | type {nl} TypeDcl | TmplDef Dcl ::= val ValDcl | var ValDcl | def DefDcl | type {nl} TypeDcl

  51. def deprecationWarning(msg: ⇒ Message, offset: Int = in.offset): Unit

  52. def dotSelectors(t: ast.untpd.Tree, finish: (ast.untpd.Tree) ⇒ ast.untpd.Tree = id): ast.untpd.Tree

    DotSelectors ::= { .' ident()

    DotSelectors ::= { .' ident()

    Accept .' separated identifiers acting as a selectors on given tree t.

    finish

    An alternative parse in case the token following a .' is not an identifier. If the alternative does not apply, its tree argument is returned unchanged.

  53. def enclosed[T](tok: Token, body: ⇒ T): T

  54. def enumerator(): ast.untpd.Tree

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

  55. def enumerators(): List[ast.untpd.Tree]

    Enumerators ::= Generator {semi Enumerator | Guard}

  56. def enumeratorsRest(): List[ast.untpd.Tree]

  57. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  58. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  59. def equalsExpr(): ast.untpd.Tree

    EqualsExpr ::= =' Expr

  60. def errorTermTree: ast.untpd.Literal

  61. def expr(location: Location.Value): ast.untpd.Tree

  62. def expr(): ast.untpd.Tree

  63. def expr1(location: Location.Value = Location.ElseWhere): ast.untpd.Tree

  64. def expr1Rest(t: ast.untpd.Tree, location: Location.Value): ast.untpd.Tree

  65. val exprInParens: () ⇒ ast.untpd.Tree

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

  66. def exprsInParensOpt(): List[ast.untpd.Tree]

    ExprsInParens ::= ExprInParens {,' ExprInParens}

  67. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  68. def forExpr(): ast.untpd.Tree

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

  69. val funArgType: () ⇒ ast.untpd.Tree

    FunArgType ::= Type | =>' Type

  70. def generator(): ast.untpd.Tree

    Generator ::= Pattern <-' Expr

  71. def generatorRest(pat: ast.untpd.Tree): GenFrom

  72. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  73. def guard(): ast.untpd.Tree

    Guard ::= if PostfixExpr

  74. val handleImport: (ast.untpd.Tree) ⇒ ast.untpd.Tree

  75. val handleSingletonType: (ast.untpd.Tree) ⇒ ast.untpd.Tree

  76. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  77. def ident(): TermName

    Accept identifier and return its name as a term name.

  78. def implicitClosure(start: Int, location: Location.Value, implicitMod: Option[Mod] = None): ast.untpd.Tree

    Expr ::= implicit Id =>' Expr BlockResult ::= implicit Id [:' InfixType] =>' Block

  79. def importClause(): List[ast.untpd.Tree]

    Import ::= import ImportExpr {,' ImportExpr}

  80. val importExpr: () ⇒ ast.untpd.Import

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

  81. def importSelector(): ast.untpd.Tree

    ImportSelector ::= Id [=>' Id | =>' _']

  82. def importSelectors(): List[ast.untpd.Tree]

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

  83. val in: Scanner

    Definition Classes
    ParserParserCommon
  84. def inBraces[T](body: ⇒ T): T

  85. def inBrackets[T](body: ⇒ T): T

  86. def inDefScopeBraces[T](body: ⇒ T): T

  87. def inParens[T](body: ⇒ T): T

  88. def incompleteInputError(msg: ⇒ Message): Unit

    Issue an error at current offset taht input is incomplete

  89. def infixOps(first: ast.untpd.Tree, canStartOperand: (Token) ⇒ Boolean, operand: () ⇒ ast.untpd.Tree, isType: Boolean = false, notAnOperator: Name = nme.EMPTY, maybePostfix: Boolean = false): ast.untpd.Tree

    operand { infixop operand} [postfixop], respecting rules of associativity and precedence.

    operand { infixop operand} [postfixop], respecting rules of associativity and precedence.

    notAnOperator

    a token that does not count as operator.

    maybePostfix

    postfix operators are allowed.

  90. def infixPattern(): ast.untpd.Tree

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

  91. def infixType(): ast.untpd.Tree

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

  92. def infixTypeRest(t: ast.untpd.Tree): ast.untpd.Tree

  93. def isDclIntro: Boolean

  94. def isDefIntro(allowedMods: BitSet): Boolean

  95. def isExprIntro: Boolean

  96. def isIdent(name: Name): Boolean

  97. def isIdent: Boolean

  98. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  99. 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.

  100. def isLiteral: Boolean

  101. def isModifier: Boolean

  102. def isNumericLit: Boolean

  103. def isSimpleLiteral: Boolean

  104. def isStatSep: Boolean

  105. def isStatSeqEnd: Boolean

  106. def isTemplateIntro: Boolean

  107. def isWildcard(t: ast.untpd.Tree): Boolean

  108. 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
    protected
    Definition Classes
    ParserCommon
  109. def literal(negOffset: Int = in.offset, inPattern: Boolean = false): ast.untpd.Tree

    SimpleExpr ::= literal | symbol | null

    SimpleExpr ::= literal | symbol | null

    negOffset

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

  110. def localDef(start: Int, implicitFlag: FlagSet, implicitMod: Option[Mod] = None): ast.untpd.Tree

  111. def makePackaging(start: Int, pkg: ast.untpd.Tree, stats: List[ast.untpd.Tree]): ast.untpd.PackageDef

    Create a tree representing a packaging

  112. def migrationWarningOrError(msg: String, offset: Int = in.offset): Unit

  113. def mixinQualifierOpt(): TypeName

    MixinQualifier ::= [' Id ]'

  114. def modifiers(allowed: BitSet = modifierTokens, start: Modifiers = Modifiers()): Modifiers

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

  115. def mustStartStat: Boolean

  116. def nameStart: Offset

    Definition Classes
    ParserCommon
  117. val namedTypeArg: () ⇒ ast.untpd.NamedArg

    NamedTypeArg ::= id =' Type

  118. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  119. def newLineOpt(): Unit

  120. def newLineOptWhenFollowedBy(token: Int): Unit

  121. def newLineOptWhenFollowing(p: (Int) ⇒ Boolean): Unit

  122. def newLinesOpt(): Unit

  123. final def notify(): Unit

    Definition Classes
    AnyRef
  124. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  125. def objectDef(start: Offset, mods: Modifiers, docstring: Option[Comment] = None): ModuleDef

    ObjectDef ::= Id TemplateOpt

  126. var opStack: List[OpInfo]

  127. val openParens: ParensCounters

  128. def packaging(start: Int): ast.untpd.Tree

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

  129. def parArgumentExprs(): List[ast.untpd.Tree]

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

  130. def parArgumentExprss(fn: ast.untpd.Tree): ast.untpd.Tree

    ParArgumentExprss ::= {ParArgumentExprs}

  131. def paramClauses(owner: Name, ofCaseClass: Boolean = false): List[List[ast.untpd.ValDef]]

    ClsParamClauses ::= {ClsParamClause} (' implicit' ClsParams )'] ClsParamClause ::= [nl] (' [ClsParams] ')' ClsParams ::= ClsParam {' ClsParam} ClsParam ::= {Annotation} [{Modifier} (val' | var') | inline'] Param DefParamClauses ::= {DefParamClause} (' implicit' DefParams )'] DefParamClause ::= [nl] (' [DefParams] ')' DefParams ::= DefParam {,' DefParam} DefParam ::= {Annotation} [inline'] Param Param ::= id :' ParamType [=' Expr]

  132. def paramType(): ast.untpd.Tree

    ParamType ::= [=>'] ParamValueType

  133. def paramValueType(): ast.untpd.Tree

    ParamValueType ::= Type [*']

  134. def parse(): ast.untpd.Tree

    This is the general parse entry point.

    This is the general parse entry point. Overridden by ScriptParser

  135. def patDefOrDcl(start: Offset, mods: Modifiers, docstring: Option[Comment] = None): ast.untpd.Tree

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

  136. def path(thisOK: Boolean, finish: (ast.untpd.Tree) ⇒ ast.untpd.Tree = id): ast.untpd.Tree

    Path ::= StableId | [Ident .'] this

    Path ::= StableId | [Ident .'] this

    thisOK

    If true, [Ident .'] this is acceptable as the path. If false, another selection is required after the this.

    finish

    An alternative parse in case the token following a .' is not an identifier. If the alternative does not apply, its tree argument is returned unchanged.

  137. val pattern: () ⇒ ast.untpd.Tree

    Pattern ::= Pattern1 { |' Pattern1 }

  138. def pattern1(): ast.untpd.Tree

    Pattern1 ::= PatVar Ascription | Pattern2

  139. val pattern2: () ⇒ ast.untpd.Tree

    Pattern2 ::= [varid @'] InfixPattern

  140. def patternAlts(): List[ast.untpd.Tree]

  141. def patterns(): List[ast.untpd.Tree]

    Patterns ::= Pattern [,' Pattern]

  142. def patternsOpt(): List[ast.untpd.Tree]

  143. var placeholderParams: List[ast.untpd.ValDef]

    The implicit parameters introduced by _ in the current expression.

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

  144. def posMods(start: Int, mods: Modifiers): Modifiers

  145. def postfixExpr(): ast.untpd.Tree

    PostfixExpr ::= InfixExpr [Id [nl]] InfixExpr ::= PrefixExpr | InfixExpr Id [nl] InfixExpr

  146. val prefixExpr: () ⇒ ast.untpd.Tree

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

  147. def qualId(): ast.untpd.Tree

    QualId ::= Id {.' Id}

  148. def reduceStack(base: List[OpInfo], top: ast.untpd.Tree, prec: Int, leftAssoc: Boolean): ast.untpd.Tree

  149. def refineStatSeq(): List[ast.untpd.Tree]

    RefineStatSeq ::= RefineStat {semi RefineStat} RefineStat ::= Dcl | (in reality we admit Defs and filter them out afterwards)

  150. val refinedType: () ⇒ ast.untpd.Tree

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

  151. def refinedTypeRest(t: ast.untpd.Tree): ast.untpd.Tree

  152. def refinement(): List[ast.untpd.Tree]

    Refinement ::= {' RefineStatSeq }'

  153. def selector(t: ast.untpd.Tree): ast.untpd.Tree

    Accept identifier acting as a selector on given tree t.

  154. def selectors(t: ast.untpd.Tree, finish: (ast.untpd.Tree) ⇒ ast.untpd.Tree): ast.untpd.Tree

    Selectors ::= ident { .' ident()

    Selectors ::= ident { .' ident()

    Accept .' separated identifiers acting as a selectors on given tree t.

    finish

    An alternative parse in case the next token is not an identifier. If the alternative does not apply, its tree argument is returned unchanged.

  155. def selfInvocation(): ast.untpd.Tree

    SelfInvocation ::= this ArgumentExprs {ArgumentExprs}

  156. def setLastStatOffset(): Unit

  157. def simpleExpr(): ast.untpd.Tree

    SimpleExpr ::= new Template | BlockExpr | SimpleExpr1 [_'] SimpleExpr1 ::= literal | xmlLiteral | Path | (' [ExprsInParens] )' | SimpleExpr .' Id | SimpleExpr (TypeArgs | NamedTypeArgs) | SimpleExpr1 ArgumentExprs

  158. def simpleExprRest(t: ast.untpd.Tree, canApply: Boolean = true): ast.untpd.Tree

  159. val simplePattern: () ⇒ ast.untpd.Tree

    SimplePattern ::= PatVar | Literal | XmlPattern | (' [Patterns] )' | SimplePattern1 [TypeArgs] [ArgumentPatterns] SimplePattern1 ::= Path | {' Block }' | SimplePattern1 .' Id PatVar ::= Id | _'

  160. def simplePatternRest(t: ast.untpd.Tree): ast.untpd.Tree

  161. def simpleType(): ast.untpd.Tree

    SimpleType ::= SimpleType TypeArgs | SimpleType #' Id | StableId | Path .' type | (' ArgTypes )' | _' TypeBounds | Refinement | Literal

  162. def skip(): Unit

    Skip on error to next safe point.

    Skip on error to next safe point. Safe points are:

    • Closing braces, provided they match an opening brace before the error point.
    • Closing parens and brackets, provided they match an opening parent or bracket before the error point and there are no intervening other kinds of parens.
    • Semicolons and newlines, provided there are no intervening braces.
    • Definite statement starts on new lines, provided they are not more indented than the last known statement start before the error point.
    Attributes
    protected
  163. val source: SourceFile

    Definition Classes
    ParserCommon
  164. def sourcePos(off: Int = in.offset): SourcePosition

    Definition Classes
    ParserCommon
  165. def stableId(): ast.untpd.Tree

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

  166. object symbXMLBuilder extends SymbolicXMLBuilder

  167. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  168. def syntaxError(msg: ⇒ Message, pos: Position): Unit

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

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

    Definition Classes
    ParserCommon
  169. def syntaxError(msg: ⇒ Message, offset: Int = in.offset): 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.

    Definition Classes
    ParserCommon
  170. def syntaxErrorOrIncomplete(msg: ⇒ Message): Unit

    If at end of file, issue an incompleteInputError.

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

  171. def template(constr: ast.untpd.DefDef): (ast.untpd.Template, Boolean)

    Template ::= ConstrApps [TemplateBody] | TemplateBody ConstrApps ::= ConstrApp {with' ConstrApp}

    Template ::= ConstrApps [TemplateBody] | TemplateBody ConstrApps ::= ConstrApp {with' ConstrApp}

    returns

    a pair consisting of the template, and a boolean which indicates whether the template misses a body (i.e. no {...} part).

  172. def templateBody(): (ast.untpd.ValDef, List[ast.untpd.Tree])

  173. def templateBodyOpt(constr: ast.untpd.DefDef, parents: List[ast.untpd.Tree]): ast.untpd.Template

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

  174. def templateOpt(constr: ast.untpd.DefDef): ast.untpd.Template

    TemplateOpt = [extends' Template | TemplateBody]

  175. def templateStatSeq(): (ast.untpd.ValDef, List[ast.untpd.Tree])

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

  176. def termIdent(): ast.untpd.Ident

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

  177. def termIdentOrWildcard(): ast.untpd.Ident

  178. def tmplDef(start: Int, mods: Modifiers): ast.untpd.Tree

    TmplDef ::= ([case'] class' | trait') ClassDef | [case'] object' ObjectDef

  179. def toString(): String

    Definition Classes
    AnyRef → Any
  180. def tokenSeparated[T](separator: Int, part: () ⇒ T): List[T]

    part { separator part }

  181. def topStatSeq(): List[ast.untpd.Tree]

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

  182. def toplevelTyp(): ast.untpd.Tree

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

  183. def typ(): ast.untpd.Tree

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

  184. def typeArgs(namedOK: Boolean = false): List[ast.untpd.Tree]

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

  185. def typeBounds(): ast.untpd.TypeBoundsTree

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

  186. def typeDefOrDcl(start: Offset, mods: Modifiers, docstring: Option[Comment] = None): ast.untpd.Tree

    TypeDef ::= type Id [TypeParamClause] =' Type TypeDcl ::= type Id [TypeParamClause] TypeBounds

  187. def typeDependingOn(location: Location.Value): ast.untpd.Tree

  188. def typeIdent(): ast.untpd.Ident

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

  189. def typeParamBounds(pname: TypeName): ast.untpd.Tree

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

  190. def typeParamClause(ownerKind: ParamOwner.Value): List[ast.untpd.TypeDef]

    ClsTypeParamClause::= [' ClsTypeParam {,' ClsTypeParam} ]' ClsTypeParam ::= {Annotation} [{Modifier} type] [+' | -'] Id [HkTypeParamClause] TypeParamBounds

    ClsTypeParamClause::= [' ClsTypeParam {,' ClsTypeParam} ]' ClsTypeParam ::= {Annotation} [{Modifier} type] [+' | -'] Id [HkTypeParamClause] TypeParamBounds

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

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

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

  191. def typeParamClauseOpt(ownerKind: ParamOwner.Value): List[ast.untpd.TypeDef]

  192. def typedOpt(): ast.untpd.Tree

  193. def unsupported(methodName: String): Nothing

    Throws an UnsupportedOperationException with the given method name.

    Throws an UnsupportedOperationException with the given method name.

    Definition Classes
    DotClass
  194. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  195. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  196. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  197. def warning(msg: ⇒ Message, offset: Int = in.offset): Unit

  198. def warning(msg: ⇒ Message, sourcePos: SourcePosition): Unit

  199. def wildcardIdent(): ast.untpd.Ident

  200. def withType(): ast.untpd.Tree

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

  201. def withTypeRest(t: ast.untpd.Tree): ast.untpd.Tree

  202. def wrapNew(tpt: ast.untpd.Tree): ast.untpd.Select

    Wrap annotation or constructor in New(...).<init>

  203. def xmlLiteral(): ast.untpd.Tree

  204. def xmlLiteralPattern(): ast.untpd.Tree

  205. lazy val xmlp: MarkupParser

    the markup parser

Inherited from ParserCommon

Inherited from DotClass

Inherited from AnyRef

Inherited from Any

Ungrouped