summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2014-02-01 00:13:53 +0100
committerEugene Burmako <xeno.by@gmail.com>2014-02-14 23:51:24 +0100
commit8c29132055845181a34ed9077d30fac87c284574 (patch)
tree29c5bb2ca8be67e324ee3e0f9d78bc62bf00d8b3 /test/files/run
parent73adf2d9de441e151a117a5b33ae707ad79a9f36 (diff)
downloadscala-8c29132055845181a34ed9077d30fac87c284574.tar.gz
scala-8c29132055845181a34ed9077d30fac87c284574.tar.bz2
scala-8c29132055845181a34ed9077d30fac87c284574.zip
adds internal.typingTransform
As per Jason’s request, this commit introduces a facility to perform tree transformations that know how to track current lexical context and how to typecheck trees in that lexical context. Interestingly enough, we can’t get away with the traditional “subclass the Transformer” approach, because the required base transformer class is declared in scala-compiler.jar, and our API is defined in scala-reflect.jar. This forced me to play with an idea that we’ve discussed with Denys today (actually, it’s already yesterday) - lightweight transformers that take contextful HOFs. This commit is a sketch in that direction. Turning `transform` and `typingTransform` into macros would make the API more elegant (see the comments), but I didn’t have time to experiment. I’m running short on time, so I haven’t had a chance to actually test this API, but I’m still submitting the pull request to ignite a discussion.
Diffstat (limited to 'test/files/run')
0 files changed, 0 insertions, 0 deletions