diff options
Diffstat (limited to 'src/dotty/tools/dotc/core/Contexts.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Contexts.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index a0bb03e50..ad3a0057d 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -550,6 +550,14 @@ object Contexts { def squashed(p: Phase): Phase = { allPhases.find(_.period.containsPhaseId(p.id)).getOrElse(NoPhase) } + + val _docstrings: mutable.Map[Symbol, String] = + mutable.Map.empty + + def docstring(sym: Symbol): Option[String] = _docstrings.get(sym) + + def addDocstring(sym: Symbol, doc: Option[String]): Unit = + doc.map(d => _docstrings += (sym -> d)) } /** The essential mutable state of a context base, collected into a common class */ |