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: ast.untpd.Modifiers): ast.untpd.Modifiers

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

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

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

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

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

    Annotation ::= @' SimpleType {ParArgumentExprs}

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

    AnnotType ::= SimpleType {Annotation}

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

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

  14. def annotsAsMods(skipNewLines: Boolean = false): ast.untpd.Modifiers

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

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

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

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

    ArgumentExprs ::= ParArgumentExprs | [nl] BlockExpr

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

    ArgumentExprss ::= {ArgumentExprs}

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

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

  20. final def asInstanceOf[T0]: T0

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

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

    Definition Classes
    ParserCommon
  23. 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
  24. def atPos[T <: Positioned](start: Offset, point: Offset, end: Offset)(t: T): T

    Definition Classes
    ParserCommon
  25. 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
  26. def block(): ast.untpd.Tree

    Block ::= BlockStatSeq

    Block ::= BlockStatSeq

    Note

    Return tree does not carry source position.

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

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

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

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

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

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

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

    CaseClauses ::= CaseClause {CaseClause}

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

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

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

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

  34. def clone(): AnyRef

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

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

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

    CompilationUnit ::= {package QualId semi} TopStatSeq

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

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

    ConstrApp ::= SimpleType {ParArgumentExprs}

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

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

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

    ConstrExpr ::= SelfInvocation | ConstrBlock

  42. def constrModsOpt(): ast.untpd.Modifiers

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

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

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

    Convert tree to formal parameter

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

    Convert tree to formal parameter list

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

    Convert (qual)ident to type identifier

  47. def defAnnotsMods(allowed: BitSet): ast.untpd.Modifiers

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

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

  49. def defOrDcl(start: Int, mods: ast.untpd.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

  50. def deprecationWarning(msg: String, offset: Int = in.offset): Unit

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

    Dotelectors ::= { .' ident()

    Dotelectors ::= { .' 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.

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

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

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

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

    Enumerators ::= Generator {semi Enumerator | Guard}

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

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

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

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

    EqualsExpr ::= =' Expr

  59. def errorTermTree: ast.untpd.Literal

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

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

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

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

  64. 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} | :' _' *'

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

    ExprsInParens ::= ExprInParens {,' ExprInParens}

  66. def finalize(): Unit

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

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

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

    FunArgType ::= Type | =>' Type

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

    Generator ::= Pattern <-' Expr

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

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

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

    Guard ::= if PostfixExpr

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

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

  75. def hashCode(): Int

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

    Accept identifier and return its name as a term name.

  77. def implicitClosure(start: Int, location: Location.Value): ast.untpd.Tree

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

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

    Import ::= import ImportExpr {,' ImportExpr}

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

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

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

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

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

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

  82. val in: Scanner

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

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

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

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

  87. def incompleteInputError(msg: String): Unit

    Issue an error at current offset taht input is incomplete

  88. 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.

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

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

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

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

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

  92. def isDclIntro: Boolean

  93. def isDefIntro(allowedMods: BitSet): Boolean

  94. def isExprIntro: Boolean

  95. def isIdent(name: Name): Boolean

  96. def isIdent: Boolean

  97. final def isInstanceOf[T0]: Boolean

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

  99. def isLiteral: Boolean

  100. def isModifier: Boolean

  101. def isNumericLit: Boolean

  102. def isSimpleLiteral: Boolean

  103. def isStatSep: Boolean

  104. def isStatSeqEnd: Boolean

  105. def isTemplateIntro: Boolean

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

  107. 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
  108. 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.

  109. def localDef(start: Int, implicitFlag: FlagSet): ast.untpd.Tree

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

    Create a tree representing a packaging

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

  112. def mixinQualifierOpt(): TypeName

    MixinQualifier ::= [' Id ]'

  113. def modifiers(allowed: BitSet = modifierTokens, start: ast.untpd.Modifiers = Modifiers()): ast.untpd.Modifiers

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

  114. def mustStartStat: Boolean

  115. def nameStart: Offset

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

    NamedTypeArg ::= id =' Type

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

    Definition Classes
    AnyRef
  118. def newLineOpt(): Unit

  119. def newLineOptWhenFollowedBy(token: Int): Unit

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

  121. def newLinesOpt(): Unit

  122. final def notify(): Unit

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

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

    ObjectDef ::= Id TemplateOpt

  125. var opStack: List[OpInfo]

  126. val openParens: ParensCounters

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

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

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

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

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

    ParArgumentExprss ::= {ParArgumentExprs}

  130. 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')] id :' ParamType [=' Expr] DefParamClauses ::= {DefParamClause} (' implicit' DefParams )'] DefParamClause ::= [nl] (' [DefParams] ')' DefParams ::= DefParam {,' DefParam} DefParam ::= {Annotation} id :' ParamType [=' Expr]

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

    ParamType ::= [=>'] ParamValueType

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

    ParamValueType ::= Type [*']

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

    This is the general parse entry point.

    This is the general parse entry point. Overridden by ScriptParser

  134. def patDefOrDcl(start: Offset, mods: ast.untpd.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

  135. 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 aftre 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.

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

    Pattern ::= Pattern1 { |' Pattern1 }

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

    Pattern1 ::= PatVar Ascription | Pattern2

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

    Pattern2 ::= [varid @'] InfixPattern

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

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

    Patterns ::= Pattern [,' Pattern]

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

  142. 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.

  143. def posMods(start: Int, mods: ast.untpd.Modifiers): ast.untpd.Modifiers

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

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

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

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

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

    QualId ::= Id {.' Id}

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

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

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

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

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

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

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

    Refinement ::= {' RefineStatSeq }'

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

    Accept identifier acting as a selector on given tree t.

  153. 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.

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

    SelfInvocation ::= this ArgumentExprs {ArgumentExprs}

  155. def setLastStatOffset(): Unit

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

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

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

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

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

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

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

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

  161. 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
  162. val source: SourceFile

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

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

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

  165. object symbXMLBuilder extends SymbolicXMLBuilder

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

    Definition Classes
    AnyRef
  167. def syntaxError(msg: String, 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
  168. def syntaxError(msg: String, 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
  169. def syntaxErrorOrIncomplete(msg: String): 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.

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

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

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

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

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

    TemplateOpt = [extends' Template | TemplateBody]

  174. 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} |

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

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

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

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

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

  178. def toString(): String

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

    part { separator part }

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

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

  181. 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.

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

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

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

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

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

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

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

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

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

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

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

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

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

  189. 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

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

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

  192. def unsupported(methodName: String): Nothing

    Throws an UnsupportedOperationException with the given method name.

    Throws an UnsupportedOperationException with the given method name.

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  196. def warning(msg: String, offset: Int = in.offset): Unit

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

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

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

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

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

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

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

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

  203. lazy val xmlp: MarkupParser

    the markup parser

Inherited from ParserCommon

Inherited from DotClass

Inherited from AnyRef

Inherited from Any

Ungrouped