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, dialect: Dialect)
Type Members
- trait CanEndStat extends AnyRef
- trait CantStartStat extends AnyRef
- trait CaseDefEnd extends AnyRef
- trait CaseIntro extends AnyRef
- trait CloseDelim extends AnyRef
- trait DclIntro extends AnyRef
- trait DefIntro extends AnyRef
- trait ExprIntro extends AnyRef
- case class IndexPos(index: Int) extends Pos with Product with Serializable
- sealed abstract class InfixContext extends AnyRef
- class InvalidModCombination[M1 <: Mod, M2 <: Mod] extends AnyRef
- trait LineEnd extends AnyRef
- trait Literal extends AnyRef
- trait LocalModifier extends AnyRef
- trait Modifier extends AnyRef
- trait NonlocalModifier extends AnyRef
- trait NumericLiteral 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.
- sealed trait Pos extends AnyRef
- 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.
- trait StatSep extends AnyRef
- trait StatSeqEnd extends AnyRef
- trait TemplateIntro extends AnyRef
- sealed trait TemplateOwner extends AnyRef
- trait TokenIterator extends Iterator[Token]
- case class TokenPos(token: Token) extends Pos with Product with Serializable
- case class TreePos(tree: Tree) extends Pos with Product with Serializable
- trait Trivia extends AnyRef
- trait TypeIntro extends AnyRef
- trait Whitespace extends AnyRef
- implicit class XtensionTokenIndex 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 acceptOpt[T <: Token](implicit arg0: TokenInfo[T]): Unit
If current token is T consume it.
- def acceptStatSep(): Unit
- def acceptStatSepOpt(): Unit
- def accessModifier(): Mod
- 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 argumentExpr(): Term
- def argumentExprs(): collection.immutable.List[Term]
- def argumentExprsOrPrefixExpr(): collection.immutable.List[Term]
- def argumentPattern(): Pat
- def argumentPatterns(): collection.immutable.List[Pat]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def atPos[T <: Tree](start: Pos, end: Pos)(body: => T): T
- def auto: AutoPos
- def autoPos[T <: Tree](body: => T): T
- def batchSource(): Source
- def block(): Term
- def blockExpr(): Term
- def blockStatSeq(): collection.immutable.List[Stat]
- def bound[T <: Token](implicit arg0: TokenInfo[T]): Option[Type]
- def caseClause(): Case
- def caseClauses(): collection.immutable.List[Case]
- def checkAssoc(op: Term.Name, leftAssoc: Boolean): Unit
- 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 constrBlock(): (Init, collection.immutable.List[Stat])
- def constrExpr(): (Init, collection.immutable.List[Stat])
- def constructorAnnots(): collection.immutable.List[Annot]
- def ctorModifiers(): Option[Mod]
- implicit val currentDialect: Dialect
- def defOrDclOrSecondaryCtor(mods: collection.immutable.List[Mod]): Stat
- final def dropAnyBraces[T](body: => T): T
- Annotations
- @inline()
- def dropTrivialBlock(term: Term): Term
- def ellipsis[T <: Tree](rank: Int, astInfo: AstInfo[T], extraSkip: => Unit = {})(implicit arg0: AstInfo[T]): T
- 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 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 enumerator(isFirst: Boolean, allowNestedIf: Boolean = true): collection.immutable.List[Enumerator]
- 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 expr(location: Location, allowRepeated: Boolean): Term
- def expr(): Term
- def exprSimpleType(): Type
- def exprTypeArgs(): collection.immutable.List[Type]
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- 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
- @inline()
- def funDefOrDclOrSecondaryCtor(mods: collection.immutable.List[Mod]): Stat
- def funDefRest(mods: collection.immutable.List[Mod]): Stat
- def generator(eqOK: Boolean, allowNestedIf: Boolean = true): collection.immutable.List[Enumerator]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def guard(): Option[Term]
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def implicitClosure(location: Location): Term.Function
- def importStmt(): Import
- def importWildcardOrName(): Importee
- def importee(): Importee
- def importees(): collection.immutable.List[Importee]
- def importer(): Importer
- var in: TokenIterator
- final def inBraces[T](body: => T): T
- Annotations
- @inline()
- final def inBracesOrError[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 inBracesOrUnit[T](body: => Term): Term
- Annotations
- @inline()
- final def inBrackets[T](body: => T): T
- Annotations
- @inline()
- final def inParens[T](body: => T): T
Methods inParensOrError and similar take a second argument which, should the next token not be the expected opener (e.g.
Methods inParensOrError and similar take a second argument which, should the next token not be the expected opener (e.g. token.LeftParen) will be returned instead of the contents of the groupers. However in all cases accept[LeftParen] will be called, so a parse error will still result. If the grouping is optional, token should be tested before calling these methods.
- Annotations
- @inline()
- final def inParensOrError[T](body: => T, alt: T): T
- Annotations
- @inline()
- final def inParensOrNil[T](body: => collection.immutable.List[T]): collection.immutable.List[T]
- Annotations
- @inline()
- def inParensOrTupleOrUnit(location: Location, allowRepeated: Boolean): Term
- final def inParensOrUnit[T, Ret >: Lit](body: => Ret): Ret
- Annotations
- @inline()
- def initInsideAnnotation(allowArgss: Boolean): Init
- def initInsideConstructor(): Init
- def initInsideTemplate(): Init
- def initRest(typeParser: () => Type, allowArgss: Boolean, allowBraces: Boolean): Init
- implicit def intToIndexPos(index: Int): IndexPos
- def interpolate[Ctx <: Tree, Ret <: Tree](arg: () => Ctx, result: (Term.Name, collection.immutable.List[Lit], collection.immutable.List[Ctx]) => Ret): Ret
- def interpolatePat(): Interpolate
- def interpolateTerm(): Interpolate
- def isAmpersand: Boolean
- def isBackquoted: Boolean
- def isBar: Boolean
- def isColonWildcardStar: 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 isSpliceFollowedBy(check: => Boolean): Boolean
- def isStar: Boolean
- def isUnaryOp: Boolean
- def literal(isNegated: Boolean = false): Lit
- def localDef(implicitMod: Option[Implicit]): Stat
- def localModifiers(): collection.immutable.List[Mod]
- def makeTuple[T <: Tree](body: collection.immutable.List[T], zero: () => T, tuple: (collection.immutable.List[T]) => T): T
- def makeTupleTerm(body: collection.immutable.List[Term]): Term
- def makeTupleType(body: collection.immutable.List[Type]): Type
- def mixinQualifier(): Name
- def modifier(): Mod
- def modifiers(isLocal: Boolean = false, isTparam: Boolean = false): collection.immutable.List[Mod]
- implicit def modsToPos(mods: collection.immutable.List[Mod]): Pos
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newLineOpt(): Unit
- def newLineOptWhenFollowedBy[T <: Token](implicit arg0: TokenInfo[T]): Unit
- def newLineOptWhenFollowing(p: (Token) => Boolean): Unit
- def newLinesOpt(): Unit
- def next(): Token
- def nextOnce(): Token
- def nextThrice(): Token
- def nextTwice(): Token
- def nonLocalDefOrDcl(): 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 <: Token](mods: collection.immutable.List[Mod], errorMsg: String)(implicit classifier: Classifier[Mod, M], tag: ClassTag[M], tokenInfo: TokenInfo[T]): Unit
- implicit def optionTreeToPos(tree: Option[Tree]): Pos
- def packageDef(): Pkg
- def packageObjectDef(): Object
- def packageOrPackageObjectDef(): Stat
- def param(ownerIsCase: Boolean, ownerIsType: Boolean, isImplicit: Boolean): Param
- def paramClauses(ownerIsType: Boolean, ownerIsCase: Boolean = false): collection.immutable.List[collection.immutable.List[Param]]
- def paramType(): Type
- 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: (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
- lazy val parserTokenPositions: Array[Int]
- lazy val parserTokens: Tokens
- 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 postfixExpr(allowRepeated: Boolean): 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 refinement(): collection.immutable.List[Stat]
- def rejectMod[M <: Mod](mods: collection.immutable.List[Mod], errorMsg: String)(implicit classifier: Classifier[Mod, M], tag: ClassTag[M]): Unit
- def rejectModCombination[M1 <: Mod, M2 <: Mod](mods: collection.immutable.List[Mod], culprit: String)(implicit invalidMod: InvalidModCombination[M1, M2], classifier1: Classifier[Mod, M1], tag1: ClassTag[M1], classifier2: Classifier[Mod, M2], tag2: ClassTag[M2]): Unit
- lazy val reporter: Reporter
- lazy val scannerTokens: Tokens
- def scriptSource(): Source
- 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
- def selectors(t: Term): Term.Ref
- def self(): Self
- def seqPatterns(): collection.immutable.List[Pat]
- def simpleExpr(allowRepeated: Boolean): Term
- def simpleExprRest(t: Term, canApply: 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]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def syntaxErrorExpected[T <: Token](implicit arg0: TokenInfo[T]): Nothing
- def template(): Template
- def templateBody(isPre: Boolean): (Self, collection.immutable.List[Stat])
- def templateBodyOpt(parenMeansSyntaxError: Boolean): (Self, collection.immutable.List[Stat])
- def templateOpt(owner: TemplateOwner): Template
- def templateParents(): collection.immutable.List[Init]
- def templateStat: PartialFunction[Token, Stat]
- def templateStatSeq(isPre: Boolean): (Self, collection.immutable.List[Stat])
- def templateStats(): collection.immutable.List[Stat]
- def termName(advance: Boolean = true): Term.Name
- def tmplDef(mods: collection.immutable.List[Mod]): Member with Stat
- def toString(): String
- Definition Classes
- AnyRef → Any
- def token: Token
- final def tokenSeparated[Sep <: Token, T <: Tree](sepFirst: Boolean, part: => T)(implicit arg0: TokenInfo[Sep], arg1: AstInfo[T]): collection.immutable.List[T]
- implicit def tokenToTokenPos(token: Token): TokenPos
- def topLevelTmplDef: Member with Stat
Hook for IDE, for top-level classes/objects.
- def topStat: PartialFunction[Token, Stat]
- def topStatSeq(): collection.immutable.List[Stat]
- def tparamModifiers(): Option[Mod]
- def traitDef(mods: collection.immutable.List[Mod]): Trait
- implicit def treeToTreePos(tree: Tree): TreePos
- 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 typeName(advance: Boolean = true): Type.Name
- def typeOrInfixType(location: Location): Type
- def typeParam(ownerIsType: Boolean, ctxBoundsAllowed: Boolean): Param
- def typeParamClauseOpt(ownerIsType: Boolean, ctxBoundsAllowed: Boolean): collection.immutable.List[Param]
- def typedOpt(): Option[Type]
- def unquote[T <: Tree](implicit arg0: AstInfo[T]): T
- def unquote[T <: Tree](advance: Boolean = true)(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
- object CanEndStat
- object CantStartStat
- object CaseDefEnd
- object CaseIntro
- object CloseDelim
- object DclIntro
- object DefIntro
- object ExprIntro
- implicit object InvalidFinalAbstract extends InvalidModCombination[Final, Abstract]
- implicit object InvalidFinalSealed extends InvalidModCombination[Final, Sealed]
- implicit object InvalidOverrideAbstract extends InvalidModCombination[Override, Abstract]
- implicit object InvalidPrivateProtected extends InvalidModCombination[Private, Protected]
- implicit object InvalidProtectedPrivate extends InvalidModCombination[Protected, Private]
- object LineEnd
- object Literal
- object LocalModifier
- object Modifier
- object NonlocalModifier
- object NumericLiteral
- object OwnedByCaseClass extends TemplateOwner
- object OwnedByClass extends TemplateOwner
- object OwnedByObject extends TemplateOwner
- object OwnedByTrait extends TemplateOwner
- object StatSep
- object StatSeqEnd
- object TemplateIntro
- object Trivia
- object TypeIntro
- object Whitespace
- 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 →[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.