Extractors

object Extractors
class Object
trait Matchable
class Any

Type members

Classlikes

object Applys

Matches predicate(bar) or predicateT where predicate can be a simple method or something selected from something else e.g: foo.method(bar) or foo.methodT

Matches predicate(bar) or predicateT where predicate can be a simple method or something selected from something else e.g: foo.method(bar) or foo.methodT

Matches case class Person(first: String, last: String) creation of the forms: Person("Joe","Bloggs") new Person("Joe","Bloggs")

Matches case class Person(first: String, last: String) creation of the forms: Person("Joe","Bloggs") new Person("Joe","Bloggs")

object ConstExpr
object GenericSeq

Ignore case where there happens to be an apply e.g. java functions where "str".length in scala will translate into "str".lenth() since for java methods () is automatically added in. Hence it's Apply( Select(Literal(IntConstant("str")), "length") ) Not just Select(Literal(IntConstant("str")), "length")

Ignore case where there happens to be an apply e.g. java functions where "str".length in scala will translate into "str".lenth() since for java methods () is automatically added in. Hence it's Apply( Select(Literal(IntConstant("str")), "length") ) Not just Select(Literal(IntConstant("str")), "length")

Note maybe there's even a case where you want multiple empty-applies e.g. foo()() to be ignored hence this would be done recursively like Untype

object Lambda1
object Lambda2
object LambdaN

Since things like the QueryParser slow are because Quoted matching is slow (or at least slower then I'd like them to be), a simple performance optimization is to check if there's a single-method being matched and if so, what is it's name. Since Scala matches unapply causes left-to-right (nested and recursively), we can add a unapply clause that will grab the name of the method (if it is a single one being matched which in most cases of the QueryParser is exaclty what we're looking for) and then match it to a name that we expect it to have. For example, if we're trying to match this: {{ case '{ ($o: Option[t]).map(${Lambda1(id, idType, body)}) } => }} We can do the following: {{ case "map" -@> '{ ($o: Option[t]).map(${Lambda1(id, idType, body)}) } => }} This will check that there's a Apply(TypeApply(Select(_, "map"), _), _) being called and then only proceecd into the quoted-matcher if that is the case.

Since things like the QueryParser slow are because Quoted matching is slow (or at least slower then I'd like them to be), a simple performance optimization is to check if there's a single-method being matched and if so, what is it's name. Since Scala matches unapply causes left-to-right (nested and recursively), we can add a unapply clause that will grab the name of the method (if it is a single one being matched which in most cases of the QueryParser is exaclty what we're looking for) and then match it to a name that we expect it to have. For example, if we're trying to match this: {{ case '{ ($o: Option[t]).map(${Lambda1(id, idType, body)}) } => }} We can do the following: {{ case "map" -@> '{ ($o: Option[t]).map(${Lambda1(id, idType, body)}) } => }} This will check that there's a Apply(TypeApply(Select(_, "map"), _), _) being called and then only proceecd into the quoted-matcher if that is the case.

object Method0
object RawLambdaN
object Seal
object SelectExpr
object TupleIdent
object TupleName
object Uninline

Uninline the term no matter what (TODO should reove the unapply case) that pattern always matches and is too confusing

Uninline the term no matter what (TODO should reove the unapply case) that pattern always matches and is too confusing

object Unseal
object Untype
object UntypeExpr
object UntypeTree
object `.`

Value members

Concrete methods

def is[T : Type](using Quotes)(inputs: Expr[_]*): Boolean
def isNumeric(using Quotes)(tpe: TypeRepr): Boolean
def isNumericPrimitive(using Quotes)(tpe: TypeRepr): Boolean
def isPrimitive(using Quotes)(tpe: TypeRepr): Boolean
def isType[T : Type](using Quotes)(expr: Expr[_]): Boolean
def isType[T : Type](using Quotes)(term: Term): Boolean
def nestInline(using Quotes)(call: Option[Tree], defs: List[Definition])(expr: Expr[_]): Expr[_]
def numericPrimitiveFitsInto(using Quotes)(into: TypeRepr, from: TypeRepr): Boolean

Check whether one numeric from can be primitively assigned to a variable of another into i.e. short can fit into a int, int can fit into a long. Same with float into a double. This is used to determine what can be assigned into what (e.g. in a insert(_.age -> 4.toShort) statement) and still be considered a valid transpilation.

Check whether one numeric from can be primitively assigned to a variable of another into i.e. short can fit into a int, int can fit into a long. Same with float into a double. This is used to determine what can be assigned into what (e.g. in a insert(_.age -> 4.toShort) statement) and still be considered a valid transpilation.

def printExpr(using Quotes)(expr: Expr[_], label: String): Unit
def summonContextMethod(using Quotes)(name: String, ctx: Expr[_]): Symbol

Summon a named method from the context Context[D, N]

Summon a named method from the context Context[D, N]

Extensions

Extensions

extension [T](expr: Expr[T])
def reseal(implicit evidence$2: Type[T], Quotes): Expr[T]
extension (expr: Expr[_])
def `.`(property: String)(using Quotes): Expr[Any]