QuoteMatcher [QCtx]
extends ObjectSupertypes
ObjectConstructors
QuoteMatcher
( qctx0: QCtx )Members
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)
.
debug
: [31mfalse[0mqctx
: QCtxqctx0
: QCtxextension_=?=
( scrutinees: List[Tree] ) ( patterns: List[Tree] ) ( implicit x$2: Context , x$3: Env ) : MatchingCheck that all trees match with =?= and concatenate the results with &&&
Check that all trees match with =?= and concatenate the results with &&&
extension_=?=
( scrutinee0: Tree ) ( pattern0: Tree ) ( implicit x$2: Context , x$3: Env ) : MatchingCheck that the trees match and return the contents from the pattern holes. Return None if the trees do not match otherwise return Some of a tuple conta...
Check that the trees match and return the contents from the pattern holes. Return None if the trees do not match otherwise return Some of a tuple containing all the contents in the holes.
matchLists
[T] ( l1: List[T] , l2: List[T] ) ( mtch: (T, T) => Matching ) : MatchingCheck that all trees match with mtch
and concatenate the results with &&&
Check that all trees match with mtch
and concatenate the results with &&&