dotty.tools.dotc.transform.PatternMatcher.Translator.TreeMakers
captures the scope and the value of the bindings in patterns important *when* the substitution happens (can't accumulate and do at once after the full matcher has been constructed)
captures the scope and the value of the bindings in patterns important *when* the substitution happens (can't accumulate and do at once after the full matcher has been constructed)
The substitution that specifies the trees that compute the values of the subpattern binders.
The substitution that specifies the trees that compute the values of the subpattern binders.
We pretend to replace the subpattern binders by subpattern refs (Even though we don't do so anymore -- see SI-5158, SI-5739 and SI-6070.)
Make a TreeMaker that will result in an extractor call specified by
extractor
the next TreeMaker (here, we don't know which it'll be) is chained after this one by flatMap'ing a function with bindernextBinder
over our extractor's result the function's body is determined by the next TreeMaker (furthermore, the interpretation offlatMap
depends on the codegen instance we're using).The values for the subpatterns, as computed by the extractor call in
extractor
, are stored in local variables that re-use the symbols insubPatBinders
. This makes extractor patterns more debuggable (SI-5739).