aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Annotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-04-07 21:43:50 +0200
committerMartin Odersky <odersky@gmail.com>2016-04-07 21:44:01 +0200
commit3e0be576398673d33ff15a6e117e04c5d5cc016f (patch)
treec25b481bdce1d8301639ee8d4e7a30e1a17d8e71 /src/dotty/tools/dotc/core/Annotations.scala
parent90f9653d80ef92fb81d3661148d8d51da1e4b568 (diff)
downloaddotty-3e0be576398673d33ff15a6e117e04c5d5cc016f.tar.gz
dotty-3e0be576398673d33ff15a6e117e04c5d5cc016f.tar.bz2
dotty-3e0be576398673d33ff15a6e117e04c5d5cc016f.zip
Add dotty.annotation.internal.SourceFile annotation
Diffstat (limited to 'src/dotty/tools/dotc/core/Annotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/Annotations.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Annotations.scala b/src/dotty/tools/dotc/core/Annotations.scala
index dc4897233..5f96a60e6 100644
--- a/src/dotty/tools/dotc/core/Annotations.scala
+++ b/src/dotty/tools/dotc/core/Annotations.scala
@@ -94,6 +94,9 @@ object Annotations {
def makeChild(sym: Symbol)(implicit ctx: Context) =
deferred(defn.ChildAnnot,
implicit ctx => New(defn.ChildAnnotType.appliedTo(sym.owner.thisType.select(sym.name, sym)), Nil))
+
+ def makeSourceFile(path: String)(implicit ctx: Context) =
+ apply(defn.SourceFileAnnot, Literal(Constant(path)))
}
def ThrowsAnnotation(cls: ClassSymbol)(implicit ctx: Context) = {