summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2014-02-15 00:35:20 +0100
committerEugene Burmako <xeno.by@gmail.com>2014-02-15 09:32:27 +0100
commit989aa437b903173f938aa8ac2f6783bcc1dd7a99 (patch)
tree7fa8cbb6e064f8fab5f855dc0788699b77c972f6 /src/reflect
parent2608db67db46bcbcd5c235b38801a8d863def637 (diff)
downloadscala-989aa437b903173f938aa8ac2f6783bcc1dd7a99.tar.gz
scala-989aa437b903173f938aa8ac2f6783bcc1dd7a99.tar.bz2
scala-989aa437b903173f938aa8ac2f6783bcc1dd7a99.zip
upgrades typingTransform
typingTransform and typingTransform's atOwner now work both with solitary trees and Tree+Symbol couples.
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/scala/reflect/macros/Internals.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/macros/Internals.scala b/src/reflect/scala/reflect/macros/Internals.scala
index 843644b7e3..75164344da 100644
--- a/src/reflect/scala/reflect/macros/Internals.scala
+++ b/src/reflect/scala/reflect/macros/Internals.scala
@@ -51,6 +51,10 @@ trait Internals {
*/
def atOwner[T](owner: Symbol)(op: => T): T
+ /** Temporarily pushes the given tree onto the recursion stack, and then calls `atOwner(symbol)(trans)`.
+ */
+ def atOwner[T](tree: Tree, owner: Symbol)(op: => T): T
+
/** Returns the symbol currently on the top of the owner stack.
* If we're not inside any `atOwner` call, then macro application's context owner will be used.
*/
@@ -66,5 +70,10 @@ trait Internals {
* @see [[TypingTransformApi]]
*/
def typingTransform(tree: Tree)(transformer: (Tree, TypingTransformApi) => Tree): Tree
+
+ /** Transforms a given tree at a given owner using the provided function.
+ * @see [[TypingTransformApi]]
+ */
+ def typingTransform(tree: Tree, owner: Symbol)(transformer: (Tree, TypingTransformApi) => Tree): Tree
}
}