class ScalametaParser extends AnyRef
- Self Type
- ScalametaParser
- Alphabetic
- By Inheritance
- ScalametaParser
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ScalametaParser(input: Input)(implicit dialect: Dialect)
Type Members
- sealed abstract class InfixContext extends AnyRef
- trait PatternContextSensitive extends AnyRef
Methods which implicitly propagate the context in which they were called: either in a pattern context or not.
Methods which implicitly propagate the context in which they were called: either in a pattern context or not. Formerly, this was threaded through numerous methods as boolean isPattern.
- trait SeqContextSensitive extends PatternContextSensitive
Methods which implicitly propagate whether the initial call took place in a context where sequences are allowed.
Methods which implicitly propagate whether the initial call took place in a context where sequences are allowed. Formerly, this was threaded through methods as boolean seqOK.
- sealed trait TemplateOwner extends AnyRef
- implicit class XtensionToken extends AnyRef
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from ScalametaParser toany2stringadd[ScalametaParser] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
- def ->[B](y: B): (ScalametaParser, B)
- Implicit
- This member is added by an implicit conversion from ScalametaParser toArrowAssoc[ScalametaParser] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def accept[T <: Token](implicit arg0: ClassTag[T]): Unit
Consume one token of the specified type, or signal an error if it is not there.
- def acceptIfStatSep(): Boolean
- Annotations
- @inline()
- def acceptStatSep(): Boolean
- def acceptStatSepOpt(): Boolean
- final def ahead[T](body: => T): T
Scoping operator used to temporarily look into the future.
Scoping operator used to temporarily look into the future. Backs up token iterator before evaluating a block and restores it after.
- Annotations
- @inline()
- def annots(skipNewLines: Boolean, allowArgss: Boolean = true): collection.immutable.List[Annot]
- def annotsBuf[T >: Annot](annots: ListBuffer[T], skipNewLines: Boolean, insidePrimaryCtorAnnot: Boolean = false, allowArgss: Boolean = true): Unit
- def argumentPattern(): Pat
- def argumentPatterns(): collection.immutable.List[Pat]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def atCurPos[T <: Tree](body: => T): T
- def atCurPosNext[T <: Tree](body: => T): T
- def atPos[T <: Tree](pos: Int)(body: => T): T
- def atPos[T <: Tree](start: Int, end: EndPos)(body: T): T
- Annotations
- @inline()
- def atPos[T <: Tree](start: StartPos, end: EndPos)(body: => T): T
- def atPosIf[T <: Tree](start: Int, end: EndPos)(body: Option[T]): Option[T]
- def atPosIf[T <: Tree](start: StartPos, end: EndPos)(body: => Option[T]): Option[T]
- def atPosOpt[T <: Tree](start: Int, end: EndPos)(body: T): T
- def atPosOpt[T <: Tree](start: StartPos, end: EndPos)(body: => T): T
- def atPosTry[T <: Tree](start: StartPos, end: EndPos)(body: => Try[T]): Try[T]
- def atPosTryOpt[T <: Tree](start: StartPos, end: EndPos)(body: => Try[T]): Try[T]
- def atPosWithBody[T <: Tree](startPos: Int, body: T, endPos: Int): T
- def autoEndPos[T <: Tree](start: StartPos)(body: => T): T
- Annotations
- @inline()
- def autoEndPos[T <: Tree](start: Int)(body: => T): T
- Annotations
- @inline()
- def autoEndPosOpt[T <: Tree](start: StartPos)(body: => T): T
- Annotations
- @inline()
- def autoEndPosOpt[T <: Tree](start: Int)(body: => T): T
- Annotations
- @inline()
- def autoPos[T <: Tree](body: => T): T
- def autoPosIf[T <: Tree](body: => Option[T]): Option[T]
- def autoPosOpt[T <: Tree](body: => T): T
- def autoPosTry[T <: Tree](body: => Try[T]): Try[T]
- def autoPrevPos[T <: Tree](body: => T): T
- Annotations
- @inline()
- def blockStatSeq(allowRepeated: Boolean = false): collection.immutable.List[Stat]
- def bound[T](implicit arg0: ClassTag[T]): Option[Type]
- def caseClause(forceSingleExpr: Boolean = false): Case
- def caseClauses(): collection.immutable.List[Case]
- def caseClausesIfAny(): Option[collection.immutable.List[Case]]
- def casesBlock(): CasesBlock
- def casesBlockIfAny(): Option[CasesBlock]
- def checkAssoc(op: Name, leftAssoc: Boolean): Unit
- Annotations
- @inline()
- def classDef(mods: collection.immutable.List[Mod]): Class
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def commaSeparated[T <: Tree](part: => T)(implicit arg0: AstInfo[T], arg1: ClassTag[T]): collection.immutable.List[T]
- Annotations
- @inline()
- final def commaSeparatedWithIndex[T <: Tree](part: (Int) => T)(implicit arg0: AstInfo[T], arg1: ClassTag[T]): collection.immutable.List[T]
- Annotations
- @inline()
- def condExpr(): Term
- def constrInternal(): Block
- def currIndex: Int
- Annotations
- @inline()
- def currToken: Token
- Annotations
- @inline()
- def defOrDclOrSecondaryCtor(mods: collection.immutable.List[Mod], enumCaseAllowed: Boolean = false, secondaryConstructorAllowed: Boolean = false): Stat
- def derivesClasses(): collection.immutable.List[Type]
- final def dropAnyBraces[T](body: => T): T
- Annotations
- @inline()
- def ellipsis[T <: Tree](ell: Ellipsis, extraSkip: => Unit)(implicit arg0: AstInfo[T], arg1: ClassTag[T]): T with Quasi
- def ellipsis[T <: Tree](ell: Ellipsis)(implicit arg0: AstInfo[T], arg1: ClassTag[T]): T with Quasi
- def ellipsis[T <: Tree](ell: Ellipsis, rank: Int, extraSkip: => Unit = {})(implicit arg0: AstInfo[T], arg1: ClassTag[T]): T
- def endMarker(): Stat
- def ensuring(cond: (ScalametaParser) => Boolean, msg: => Any): ScalametaParser
- Implicit
- This member is added by an implicit conversion from ScalametaParser toEnsuring[ScalametaParser] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (ScalametaParser) => Boolean): ScalametaParser
- Implicit
- This member is added by an implicit conversion from ScalametaParser toEnsuring[ScalametaParser] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): ScalametaParser
- Implicit
- This member is added by an implicit conversion from ScalametaParser toEnsuring[ScalametaParser] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): ScalametaParser
- Implicit
- This member is added by an implicit conversion from ScalametaParser toEnsuring[ScalametaParser] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def entryPointAmmonite(): MultiSource
- def entrypointCase(): Case
- def entrypointCtor(): Ctor
- def entrypointEnumerator(): Enumerator
- def entrypointExpr(): Term
- def entrypointImportee(): Importee
- def entrypointImporter(): Importer
- def entrypointInit(): Init
- def entrypointModifier(): Mod
- def entrypointPattern(): Pat
- def entrypointSelf(): Self
- def entrypointSource(): Source
- def entrypointStat(): Stat
- def entrypointTemplate(): Template
- def entrypointTermParam(): Param
- def entrypointType(): Type
- def entrypointTypeParam(): Param
- def enumCaseDef(mods: collection.immutable.List[Mod]): Stat
- def enumRepeatedCaseDef(mods: collection.immutable.List[Mod]): RepeatedEnumCase
- def enumSingleCaseDef(mods: collection.immutable.List[Mod]): EnumCase
- def enumerators(): collection.immutable.List[Enumerator]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def exportStmt(): Stat
- def expr(location: Location, allowRepeated: Boolean): Term
- def expr(): Term
- def exprSimpleType(): Type
- def exprTypeArgs(): ArgClause
- def extensionGroupDecl(mods: collection.immutable.List[Mod]): ExtensionGroup
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def funDefOrDclOrExtensionOrSecondaryCtor(mods: collection.immutable.List[Mod]): Stat
- def funDefRest(mods: collection.immutable.List[Mod]): Stat
- def getAfterOptNewLine[A](body: => Option[A]): Option[A]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def ifClause(mods: collection.immutable.List[Mod] = Nil): If
- def importStmt(): Import
- def importWildcardOrName(): Importee
- def importee(): Importee
- def importeeRename(from: Name): Importee
- def importees(): collection.immutable.List[Importee]
- def importer(): Importer
- var in: TokenIterator
- final def inBraces[T](body: => T): T
- Annotations
- @inline()
- final def inBracesOr[T](body: => T)(ifEmpty: => T): T
- Annotations
- @inline()
- final def inBracesOrNil[T](body: => collection.immutable.List[T]): collection.immutable.List[T]
- Annotations
- @inline()
- final def inBrackets[T](body: => T): T
- Annotations
- @inline()
- final def inParens[T](body: => T): T
- Annotations
- @inline()
- final def inParensOr[T](body: => T)(ifEmpty: => T): T
- Annotations
- @inline()
- final def indented[T](body: => T): T
- Annotations
- @inline()
- def init(): Init
- def initInsideConstructor(): Init
- def initInsideTemplate(): Init
- def initRest(typeParser: => Type, allowArgss: Boolean, insidePrimaryCtorAnnot: Boolean = false, allowBraces: Boolean = false, allowTypeSingleton: Boolean = true): Init
- def inlineMatchClause(inlineMods: collection.immutable.List[Mod]): Match
Deals with Scala 3 concept of
Deals with Scala 3 concept of
inline x match { .... Since matches can also be chained in Scala 3 we need to create the Match first and only then add the the inline modifier.
- implicit def intToIndexPos(index: Int): Pos
- def interpolatePat(): Interpolate
- def interpolateTerm(): Interpolate
- def isAfterOptNewLine(body: (Token) => Boolean): Boolean
- def isAfterOptNewLine[T](implicit arg0: ClassTag[T]): Boolean
- def isAtEndMarker(): Boolean
- def isImplicitStatSep(): Boolean
- Annotations
- @inline()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isStar(tok: Token): Boolean
- def isStar: Boolean
- Annotations
- @inline()
- def literal(): Lit
- def localDef(implicitMod: Option[Implicit]): Stat
- def memberParamClauseGroups(ownerIsType: Boolean, ctxBoundsAllowed: Boolean): collection.immutable.List[ParamClauseGroup]
- def mixinQualifier(): Name
- def modifiersBuf(buf: ListBuffer[Mod], isLocal: Boolean = false, isParams: Boolean = false): Unit
- implicit def modsToPos(mods: collection.immutable.List[Mod]): Pos
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newLineOpt(): Unit
- Annotations
- @inline()
- def newLineOptWhenFollowedBy[T](implicit arg0: ClassTag[T]): Unit
- def newLineOptWhenFollowedBy(unapply: (Token) => Boolean): Unit
- def newLineOptWhenFollowedBySignificantIndentationAnd(cond: (Token) => Boolean): Boolean
- def newLinesOpt(): Unit
- Annotations
- @inline()
- def next(): Unit
- def nextTwice(): Unit
- def nonLocalDefOrDcl(enumCaseAllowed: Boolean = false, secondaryConstructorAllowed: Boolean = false): Stat
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def objectDef(mods: collection.immutable.List[Mod]): Object
- implicit def optionTreeToPos(tree: Option[Tree]): Pos
- def paramType(): Type
- def parseAmmonite(): MultiSource
- def parseCase(): Case
- def parseCtor(): Ctor
- def parseEnumerator(): Enumerator
- def parseImportee(): Importee
- def parseImporter(): Importer
- def parseInit(): Init
- def parseMod(): Mod
- def parsePat(): Pat
- def parseRule[T <: Tree](rule: => T): T
- def parseRule[T <: Tree](rule: (ScalametaParser.this.type) => T): T
- def parseSelf(): Self
- def parseSource(): Source
- def parseStat(): Stat
- def parseTemplate(): Template
- def parseTerm(): Term
- def parseTermParam(): Param
- def parseType(): Type
- def parseTypeParam(): Param
- def parseUnquotePat(): Pat
- def parseUnquoteTerm(): Term
- def patDefOrDcl(mods: collection.immutable.List[Mod]): Stat
- def path(thisOK: Boolean = true): Term.Ref
- def pattern(): Pat
Default entry points into some pattern contexts.
- def patternTyp(): Type
- def patternTypeArgs(): ArgClause
- def peekIndex: Int
- Annotations
- @inline()
- def peekToken: Token
- Annotations
- @inline()
- def polyFunction(): PolyFunction
- def postfixExpr(allowRepeated: Boolean): Term
- def prefixExpr(allowRepeated: Boolean): Term
- def prevIndex: Int
- Annotations
- @inline()
- def prevToken: Token
- Annotations
- @inline()
- def primaryCtor(owner: TemplateOwner): Primary
- def qualId(): Term.Ref
- def quasiquoteCase(): Case
- def quasiquoteCtor(): Ctor
- def quasiquoteEnumerator(): Enumerator
- def quasiquoteExpr(): Term
- def quasiquoteImportee(): Importee
- def quasiquoteImporter(): Importer
- def quasiquoteInit(): Init
- def quasiquoteModifier(): Mod
- def quasiquotePattern(): Pat
- def quasiquoteSelf(): Self
- def quasiquoteSource(): Source
- def quasiquoteStat(): Stat
- def quasiquoteTemplate(): Template
- def quasiquoteTermParam(): Param
- def quasiquoteType(): Type
- def quasiquoteTypeParam(): Param
- final lazy val reporter: Reporter
- def secondaryCtor(mods: collection.immutable.List[Mod]): Secondary
- def secondaryCtorRest(mods: collection.immutable.List[Mod], name: This, paramss: collection.immutable.Seq[ParamClause]): Secondary
- def selector(t: Term, startPos: Int): Select
- def seqPatterns(): collection.immutable.List[Pat]
- def simpleExpr(allowRepeated: Boolean): Term
- def skipAllStatSep(): Boolean
- def source(): Source
- def stableId(): Term.Ref
- def startInfixType(): Type
- def startModType(): Type
- def stat(body: => Stat): Stat
- def statSeq[T <: Tree](statpf: PartialFunction[Token, T], errorMsg: String = "illegal start of definition"): collection.immutable.List[T]
- def statSeqBuf[T <: Tree](stats: ListBuffer[T], statpf: PartialFunction[Token, T], errorMsg: String = "illegal start of definition"): Boolean
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def template(owner: TemplateOwner, afterExtend: Boolean = false): Template
- def templateBodyOpt(owner: TemplateOwner): Body
- def templateOpt(owner: TemplateOwner): Template
- def templateParents(afterExtend: Boolean = false): collection.immutable.List[Init]
- def templateStat(enumCaseAllowed: Boolean = false, secondaryConstructorAllowed: Boolean = false): PartialFunction[Token, Stat]
- def termName(): Term.Name
- def termParam(ownerIsCase: Boolean, ownerIsType: Boolean, mod: Option[ParamsType] = None)(paramIdx: Int): Param
- def termParamClauses(ownerIsType: Boolean, ownerIsCase: Boolean = false): collection.immutable.List[ParamClause]
- def toCasesBlock(cases: collection.immutable.List[Case]): CasesBlock
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def tokenSeparated[Sep, T <: Tree](sepFirst: Boolean, part: (Int) => T)(implicit arg0: ClassTag[Sep], arg1: AstInfo[T], arg2: ClassTag[T]): collection.immutable.List[T]
- def topLevelTmplDef: Stat
Hook for IDE, for top-level classes/objects.
- val topStat: PartialFunction[Token, Stat]
- implicit def treeToTreePos(tree: Tree): Pos
- def typ(): Type
These are default entry points into the pattern context sensitive methods: they are all initiated from non-pattern context.
- def typeBounds(): Bounds
- def typeDefOrDcl(mods: collection.immutable.List[Mod]): TypeDef
- def typeIndentedOpt(): Type
- def typeName(): Type.Name
- def typeParam(ownerIsType: Boolean, ctxBoundsAllowed: Boolean, allowUnderscore: Boolean = true): Param
- def typedOpt(): Option[Type]
- def unquote[T <: Tree](implicit arg0: AstInfo[T]): T with Quasi
- def unquoteExpr(): Term
- def unquotePattern(): Pat
- def unquoteSeqPattern(): Pat
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def xmlLiteralPattern(): Pat
- def xmlPat(): Xml
- def xmlTerm(): Xml
- case object AutoPos extends Pos with Product with Serializable
- object OwnedByCaseClass extends TemplateOwner
- object OwnedByClass extends TemplateOwner
- object OwnedByEnum extends TemplateOwner
- object OwnedByGiven extends TemplateOwner
- object OwnedByObject extends TemplateOwner
- object OwnedByTrait extends TemplateOwner
- object noSeq extends SeqContextSensitive
The implementation for parsing inside of patterns at points where sequences are disallowed.
- object outPattern extends PatternContextSensitive
The implementation of the context sensitive methods for parsing outside of patterns.
- implicit object patInfixContext extends InfixContext
- object seqOK extends SeqContextSensitive
The implementation for parsing inside of patterns at points where sequences are allowed.
- object termInfixContext extends InfixContext
Deprecated Value Members
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from ScalametaParser toStringFormat[ScalametaParser] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)instead ofvalue.formatted(formatString), or use thef""string interpolator. In Java 15 and later,formattedresolves to the new method in String which has reversed parameters.
- def →[B](y: B): (ScalametaParser, B)
- Implicit
- This member is added by an implicit conversion from ScalametaParser toArrowAssoc[ScalametaParser] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.