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
- All
Instance Constructors
- new ScalametaParser(input: Input)(implicit dialect: Dialect)
Type Members
- sealed abstract class InfixContext extends AnyRef
- class InvalidModCombination[M1 <: Mod, M2 <: Mod] 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
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 to any2stringadd[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 to ArrowAssoc[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: TokenInfo[T]): Unit
Consume one token of the specified type, or signal an error if it is not there.
- def acceptStatSep(): Unit
- def acceptStatSepOpt(): Unit
-
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 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 auto: AutoPos.type
-
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: Int)(body: ⇒ T): T
- Annotations
- @inline()
- def autoPos[T <: Tree](body: ⇒ T): 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 batchSource(statpf: PartialFunction[Token, Stat] = topStat): Source
- def blockStatSeq(allowRepeated: Boolean = false): collection.immutable.List[Stat]
- def bound[T](implicit arg0: tokens.TokenClassifier[T]): Option[Type]
- def caseClause(forceSingleExpr: Boolean = false): Case
- def caseClauses(): collection.immutable.List[Case]
- def caseClausesIfAny(): Option[collection.immutable.List[Case]]
-
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( ... ) @native()
-
final
def
commaSeparated[T <: Tree](part: ⇒ T)(implicit arg0: AstInfo[T]): collection.immutable.List[T]
- Annotations
- @inline()
-
final
def
commaSeparatedWithIndex[T <: Tree](part: (Int) ⇒ T)(implicit arg0: AstInfo[T]): collection.immutable.List[T]
- Annotations
- @inline()
- def condExpr(): Term
- def constrInternal(): (Init, collection.immutable.List[Stat])
- 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]): T
- def ellipsis[T <: Tree](ell: Ellipsis)(implicit arg0: AstInfo[T]): T
- def ellipsis[T <: Tree](ell: Ellipsis, rank: Int, extraSkip: ⇒ Unit = {})(implicit arg0: AstInfo[T]): T
- def endMarker(): Stat
- def ensureEarlyDef(tree: Stat): Stat
-
def
ensuring(cond: (ScalametaParser) ⇒ Boolean, msg: ⇒ Any): ScalametaParser
- Implicit
- This member is added by an implicit conversion from ScalametaParser to Ensuring[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 to Ensuring[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 to Ensuring[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 to Ensuring[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 enumDef(mods: collection.immutable.List[Mod]): Enum
- 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: Any): Boolean
- Definition Classes
- AnyRef → Any
- def existentialStats(): collection.immutable.List[Stat]
- def expect[T <: Token](implicit arg0: TokenInfo[T]): Unit
- 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[_]
- 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 implicitClosure(location: Location): Term.Function
- 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.
inline x match { ... }}} 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[T](implicit arg0: tokens.TokenClassifier[T]): Boolean
- def isBar: Boolean
- def isIdentExcept(except: String): Boolean
- def isIdentOf(tok: Token, name: String): Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isStar(tok: Token): Boolean
-
def
isStar: Boolean
- Annotations
- @inline()
- def isUnaryOp: Boolean
- def isVarargStarParam(allowRepeated: Boolean): Boolean
- def literal(isNegated: Boolean = false): 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: tokens.TokenClassifier[T]): Unit
- def newLineOptWhenFollowedBySignificantIndentationAnd(cond: (Token) ⇒ Boolean): Boolean
-
def
newLinesOpt(): Unit
- Annotations
- @inline()
-
def
next(): Unit
- Annotations
- @inline()
- 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
- def onlyAcceptMod[M <: Mod, T](mods: collection.immutable.List[Mod], errorMsg: String)(implicit arg0: ClassTag[M], arg1: tokens.TokenClassifier[T], classifier: Classifier[Mod, M]): Unit
- def onlyAllowedMods(mods: collection.immutable.List[Mod], matchers: collection.immutable.List[(Mod) ⇒ Boolean], culprit: String): Unit
- def onlyAllowedMods[M1 <: Mod, M2 <: Mod](mods: collection.immutable.List[Mod], culprit: String)(implicit classifier1: Classifier[Mod, M1], classifier2: Classifier[Mod, M2]): Unit
- implicit def optionTreeToPos(tree: Option[Tree]): Pos
- def packageOrPackageObjectDef(statpf: PartialFunction[Token, Stat]): Stat
- 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, location: Location = NoStat): Term
- def prefixExpr(allowRepeated: Boolean): Term
-
def
prevToken: Token
- Annotations
- @inline()
-
def
prevTokenPos: Int
- 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
- def refineStat(): Option[Stat]
- def refineStatSeq(): collection.immutable.List[Stat]
- def rejectMod[M <: Mod](mods: collection.Iterable[Mod], errorMsg: String)(implicit classifier: Classifier[Mod, M], tag: ClassTag[M]): Unit
- def rejectModCombination[M1 <: Mod, M2 <: Mod](mods: collection.Iterable[Mod], culpritOpt: ⇒ Option[String] = None)(implicit arg0: ClassTag[M1], arg1: ClassTag[M2], classifier1: Classifier[Mod, M1], classifier2: Classifier[Mod, M2]): Unit
- def rejectModWith[M <: Mod](m2: Mod, mods: collection.Iterable[Mod], culpritOpt: ⇒ Option[String] = None)(implicit arg0: ClassTag[M], classifier: Classifier[Mod, M]): Unit
- 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): Select
- Annotations
- @inline()
- def selector(t: Term, startPos: Int): Select
- def seqPatterns(): collection.immutable.List[Pat]
- def simpleExpr(allowRepeated: Boolean): Term
- 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")(implicit arg0: AstInfo[T]): collection.immutable.List[T]
- def statSeqBuf[T <: Tree](stats: ListBuffer[T], statpf: PartialFunction[Token, T], errorMsg: String = "illegal start of definition")(implicit arg0: AstInfo[T]): Boolean
- def summonClassifierFunc[A, B](implicit v: Classifier[A, B]): (A) ⇒ Boolean
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def syntaxErrorExpected[T <: Token](implicit tokenInfo: TokenInfo[T]): Nothing
- def template(owner: TemplateOwner, afterExtend: Boolean = false): Template
- def templateBodyOpt(owner: TemplateOwner): (Self, collection.immutable.List[Stat])
- 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 tmplDef(mods: collection.immutable.List[Mod]): Stat
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
token: Token
- Annotations
- @inline()
-
def
tokenPos: Int
- Annotations
- @inline()
- final def tokenSeparated[Sep, T <: Tree](sepFirst: Boolean, part: (Int) ⇒ T)(implicit arg0: tokens.TokenClassifier[Sep], arg1: AstInfo[T]): collection.immutable.List[T]
-
def
topLevelTmplDef: Stat
Hook for IDE, for top-level classes/objects.
- val topStat: PartialFunction[Token, Stat]
- def traitDef(mods: collection.immutable.List[Mod]): Trait
- 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]): Member.Type with Stat
- def typeIndentedOpt(): Type
- def typeName(): Type.Name
- def typeOrInfixType(location: Location): Type
- 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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def xmlLiteralPattern(): Pat
- def xmlPat(): Xml
- def xmlTerm(): Xml
-
def
→[B](y: B): (ScalametaParser, B)
- Implicit
- This member is added by an implicit conversion from ScalametaParser to ArrowAssoc[ScalametaParser] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- object AutoPos extends Pos with Product with Serializable
- object EndPosPreOutdent extends EndPos with Product with Serializable
- implicit object InvalidCaseImplicit extends InvalidModCombination[Mod.Case, Implicit]
- implicit object InvalidFinalAbstract extends InvalidModCombination[Final, Abstract]
- implicit object InvalidFinalSealed extends InvalidModCombination[Final, Sealed]
- implicit object InvalidOpenFinal extends InvalidModCombination[Open, Final]
- implicit object InvalidOpenSealed extends InvalidModCombination[Open, Sealed]
- implicit object InvalidOverrideAbstract extends InvalidModCombination[Override, Abstract]
- implicit object InvalidPrivateProtected extends InvalidModCombination[Private, Protected]
- implicit object InvalidProtectedPrivate extends InvalidModCombination[Protected, Private]
- object OwnedByCaseClass extends TemplateOwner
- object OwnedByClass extends TemplateOwner
- object OwnedByEnum 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 to StringFormat[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.