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
- class InvalidModCombination[M1 <: Mod, M2 <: Mod] extends AnyRef
- trait MacroQuotedIdent extends AnyRef
- trait MacroSplicedIdent 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 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: 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, allowArgss: Boolean = true): Unit
- def argumentExpr(location: Location): Term
- def argumentExprs(location: Location = NoStat): collection.immutable.List[Term]
- def argumentExprsWithUsing(location: Location = NoStat): (collection.immutable.List[Term], Boolean)
- 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 atPos[T <: Tree](token: Token)(body: => T): T
- def atPosTry[T <: Tree](start: StartPos, end: EndPos)(body: => Try[T]): Try[T]
- def atPosWithBody[T <: Tree](startTokenPos: Int, body: T, endPos: Int): T
- def auto: AutoPos
- def autoEndPos[T <: Tree](start: StartPos)(body: => T): T
- Annotations
- @inline()
- def autoEndPos[T <: Tree](start: Int)(body: => T): T
- Annotations
- @inline()
- def autoPos[T <: Tree](body: => T): T
- def autoPosTry[T <: Tree](body: => Try[T]): Try[T]
- def batchSource(statpf: PartialFunction[Token, Stat] = topStat): Source
- def block(isBlockOptional: Boolean = false, allowRepeated: Boolean = false): Term
- def blockExpr(isBlockOptional: Boolean = false, allowRepeated: Boolean = false): Term
- 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(classOf[java.lang.CloneNotSupportedException]) @native()
- final def commaSeparated[T <: Tree](part: => T)(implicit arg0: AstInfo[T]): collection.immutable.List[T]
- Annotations
- @inline()
- def condExpr(): Term
- def condExprInParens[T <: Token](implicit arg0: TokenInfo[T]): Term
- def constrInternal(): (Init, collection.immutable.List[Stat])
- def ctorModifiers(): Option[Mod]
- 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 astInfo: 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 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 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: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def existentialStats(): collection.immutable.List[Stat]
- def exportStmt(): Stat
- def expr(location: Location, allowRepeated: Boolean): Term
- def expr(): Term
- def exprSimpleType(): Type
- def exprTypeArgs(): collection.immutable.List[Type]
- def extensionGroupDecl(mods: collection.immutable.List[Mod]): ExtensionGroup
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def followedByToken[T](implicit arg0: tokens.TokenClassifier[T]): Boolean
- def funDefOrDclOrExtensionOrSecondaryCtor(mods: collection.immutable.List[Mod]): Stat
- def funDefRest(mods: collection.immutable.List[Mod]): Stat
- 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 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, alt: => 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()
- def inParensOrTupleOrUnitExpr(allowRepeated: Boolean): Term
- final def indented[T](body: => T): T
- Annotations
- @inline()
- def init(): Init
- def initInsideAnnotation(allowArgss: Boolean): Init
- def initInsideConstructor(): Init
- def initInsideTemplate(): Init
- def initRest(typeParser: => Type, allowArgss: Boolean, allowBraces: Boolean, allowTypeSingleton: Boolean): 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 isAmpersand: Boolean
- def isBackquoted: Boolean
- def isBar: Boolean
- def isColonEol(token: Token): Boolean
- def isIdent: Boolean
- def isIdentAnd(pred: (String) => Boolean): Boolean
- def isIdentExcept(except: String): Boolean
- def isIdentOf(name: String): Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isStar: Boolean
- def isUnaryOp: Boolean
- def isVarargStarParam(): Boolean
- def literal(isNegated: Boolean = false): Lit
- def localDef(implicitMod: Option[Implicit]): Stat
- def macroQuote(): Term
- def macroQuotedIdent(): Term
- def macroSplice(): Term
- def macroSplicedIdent(): Term
- def makeTupleTerm(lpPos: Int, body: collection.immutable.List[Term]): Term
- def makeTupleType(lpPos: Int, body: collection.immutable.List[Type]): Type
- def matchClause(t: Term): Match
- 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
- 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 param(ownerIsCase: Boolean, ownerIsType: Boolean, isImplicit: Boolean, isUsing: Boolean): Param
- def paramClauses(ownerIsType: Boolean, ownerIsCase: Boolean = false): collection.immutable.List[collection.immutable.List[Param]]
- 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(): collection.immutable.List[Type]
- def polyFunction(): PolyFunction
- def postfixExpr(allowRepeated: Boolean, location: Location = NoStat): Term
- def prefixExpr(allowRepeated: Boolean): Term
- 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: Name, paramss: collection.immutable.List[collection.immutable.List[Param]]): 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]): Unit
- 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(afterExtend: Boolean = false, enumCaseAllowed: Boolean, secondaryConstructorAllowed: Boolean): Template
- def template(edefs: collection.immutable.List[Stat], parents: collection.immutable.List[Init], enumCaseAllowed: Boolean, secondaryConstructorAllowed: Boolean): Template
- def templateBody(enumCaseAllowed: Boolean = false, secondaryConstructorAllowed: Boolean = false): (Self, collection.immutable.List[Stat])
- def templateBodyOpt(parenMeansSyntaxError: Boolean, enumCaseAllowed: Boolean = false, secondaryConstructorAllowed: Boolean = false): (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 templateStatSeq(enumCaseAllowed: Boolean = false, secondaryConstructorAllowed: Boolean = false): (Self, collection.immutable.List[Stat])
- def termName(): Term.Name
- def tmplDef(mods: collection.immutable.List[Mod]): Stat
- def toString(): String
- Definition Classes
- AnyRef → Any
- def token: Token
- final def tokenSeparated[Sep, T <: Tree](sepFirst: Boolean, part: => T)(implicit arg0: tokens.TokenClassifier[Sep], arg1: AstInfo[T]): collection.immutable.List[T]
- implicit def tokenToTokenPos(token: Token): Pos
- def topLevelTmplDef: Stat
Hook for IDE, for top-level classes/objects.
- val topStat: PartialFunction[Token, Stat]
- def tparamModifiers(): Option[Mod]
- 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 typeParamClauseOpt(ownerIsType: Boolean, ctxBoundsAllowed: Boolean, allowUnderscore: Boolean = true): collection.immutable.List[Param]
- def typedOpt(): Option[Type]
- def unquote[T <: Tree](implicit arg0: AstInfo[T]): T
- def unquoteExpr(): Term
- def unquotePattern(): Pat
- def unquoteXmlExpr(): Term
- def unquoteXmlPattern(): 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 xmlSeqPatterns(): collection.immutable.List[Pat]
- def xmlTerm(): Xml
- case object AutoPos extends Pos with Product with Serializable
- case 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 MacroQuotedIdent
- object MacroSplicedIdent
- object OwnedByCaseClass extends TemplateOwner
- object OwnedByClass extends TemplateOwner
- object OwnedByEnum extends TemplateOwner
- object OwnedByObject extends TemplateOwner
- object OwnedByTrait extends TemplateOwner
- case object StartPosPrev extends StartPos with Product with Serializable
- 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
- object xmlSeqOK extends SeqContextSensitive
For use from xml pattern, where sequence is allowed and encouraged.
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.