C class

QuoteMatcher [QCtx]

extends Object

Supertypes

Object

Constructors

QuoteMatcher

( ) ( implicit  qctx: QCtx )

Members

private object 

ClosedPatternTerm

private object 

IdentArgs

class 

SymBinding

private object 

treeListOps

private object 

treeOps

private type 

Env

 = Map[Symbol,Symbol]

A map relating equivalent symbols from the scrutinee and the pattern For example in

A map relating equivalent symbols from the scrutinee and the pattern For example in

'{val a = 4; a * a} match case '{ val x = 4; x * x }

when matching a * a with x * x the environment will contain Map(a -> x).

private final val 

debug

: false

given val 

qctx

: QCtx

private def 

caseMatches

( scrutinee: CaseDef pattern: CaseDef ) ( implicit  x$3: Context x$4: Env ) : Matching

private def 

foldPatterns

( patterns1: List[Tree] patterns2: List[Tree] ) ( implicit  x$3: Context x$4: Env ) : ( Env, Matching )

private def 

hasBindAnnotation

( sym: Symbol ) : Boolean

private def 

hasBindTypeAnnotation

( tpt: TypeTree ) : Boolean

private def 

hasFromAboveAnnotation

( sym: Symbol ) : Boolean

private def 

isBindAnnotation

( tree: Tree ) : Boolean

private def 

isFromAboveAnnotation

( tree: Tree ) : Boolean

private def 

isTypeBinding

( tree: Tree ) : Boolean

private def 

matchLists

[T] ( l1: List[T] l2: List[T] ) ( mtch: (T, T) => Matching ) : Matching

Check that all trees match with mtch and concatenate the results with &&

Check that all trees match with mtch and concatenate the results with &&

private def 

patternsMatches

( scrutinee: Tree pattern: Tree ) ( implicit  x$3: Context x$4: Env ) : ( Env, Matching )

Check that the pattern trees match and return the contents from the pattern holes. Return a tuple with the new environment containing the bindings defi...

Check that the pattern trees match and return the contents from the pattern holes. Return a tuple with the new environment containing the bindings defined in this pattern and a matching. The matching is None if the pattern trees do not match otherwise return Some of a tuple containing all the contents in the holes.

def 

termMatch

( scrutineeTerm: Term patternTerm: Term hasTypeSplices: Boolean ) : Option[Tuple]

private def 

treeOptMatches

( scrutinee: Option[Tree] pattern: Option[Tree] ) ( implicit  x$3: Context x$4: Env ) : Matching

def 

typeTreeMatch

( scrutineeTypeTree: TypeTree patternTypeTree: TypeTree hasTypeSplices: Boolean ) : Option[Tuple]

private inline def 

withEnv

[T] ( env: Env ) ( body: => implicit Env => T ) : T