summaryrefslogtreecommitdiff
path: root/src/scaladoc
diff options
context:
space:
mode:
authorAntoine Gourlay <antoine@gourlay.fr>2014-01-31 20:17:35 +0100
committerAntoine Gourlay <antoine@gourlay.fr>2014-01-31 22:53:15 +0100
commita9e903586e8e0547d0913b9427ee19a20092798d (patch)
tree5c8e6e929637cc3736ea313037e671d18a3932a4 /src/scaladoc
parentf59aeb58681d1dba8d32886de4785f6fb8dc9eff (diff)
downloadscala-a9e903586e8e0547d0913b9427ee19a20092798d.tar.gz
scala-a9e903586e8e0547d0913b9427ee19a20092798d.tar.bz2
scala-a9e903586e8e0547d0913b9427ee19a20092798d.zip
SI-7124 make macro definitions prettier in scaladoc
Macros are now prettier in scaladoc, by - hiding the `macroImpl` annotation - showing the `macro` modifier in front
Diffstat (limited to 'src/scaladoc')
-rw-r--r--src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala
index 8f217e087c..ef84ac42ba 100644
--- a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala
+++ b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala
@@ -10,6 +10,7 @@ import diagram._
import scala.collection._
import scala.util.matching.Regex
+import scala.reflect.macros.internal.macroImpl
import symtab.Flags
import io._
@@ -80,7 +81,7 @@ class ModelFactory(val global: Global, val settings: doc.Settings) {
def inTemplate: TemplateImpl = inTpl
def toRoot: List[EntityImpl] = this :: inTpl.toRoot
def qualifiedName = name
- def annotations = sym.annotations.map(makeAnnotation)
+ def annotations = sym.annotations.filterNot(_.tpe =:= typeOf[macroImpl]).map(makeAnnotation)
def inPackageObject: Boolean = sym.owner.isModuleClass && sym.owner.sourceModule.isPackageObject
def isType = sym.name.isTypeName
}
@@ -145,6 +146,7 @@ class ModelFactory(val global: Global, val settings: doc.Settings) {
* any abstract terms, otherwise it would fail compilation. So we reset the DEFERRED flag. */
if (!sym.isTrait && (sym hasFlag Flags.DEFERRED) && (!isImplicitlyInherited)) fgs += Paragraph(Text("abstract"))
if (!sym.isModule && (sym hasFlag Flags.FINAL)) fgs += Paragraph(Text("final"))
+ if (sym.isMacro) fgs += Paragraph(Text("macro"))
fgs.toList
}
def deprecation =