diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-09-28 11:41:36 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-10-10 13:25:36 +0200 |
commit | f7b8980fad5adb20e9a420a16f5b3416927dccbc (patch) | |
tree | e24ca2ae0b0c19660d0f096b00dadef0eb010b64 /src/dotty/tools/dotc/reporting/diagnostic/messages.scala | |
parent | 18d63fe71ebc80bc8e111dbb20b6b0ea1f3700af (diff) | |
download | dotty-f7b8980fad5adb20e9a420a16f5b3416927dccbc.tar.gz dotty-f7b8980fad5adb20e9a420a16f5b3416927dccbc.tar.bz2 dotty-f7b8980fad5adb20e9a420a16f5b3416927dccbc.zip |
Improve documentation for message framework
Diffstat (limited to 'src/dotty/tools/dotc/reporting/diagnostic/messages.scala')
-rw-r--r-- | src/dotty/tools/dotc/reporting/diagnostic/messages.scala | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/reporting/diagnostic/messages.scala b/src/dotty/tools/dotc/reporting/diagnostic/messages.scala index 26c5622fa..11c6b43d9 100644 --- a/src/dotty/tools/dotc/reporting/diagnostic/messages.scala +++ b/src/dotty/tools/dotc/reporting/diagnostic/messages.scala @@ -14,7 +14,7 @@ import printing.Formatting object messages { - /** Message container to be consumed by the reporter ---------------------- */ + // `MessageContainer`s to be consumed by `Reporter` ---------------------- // class Error( msgFn: => Message, pos: SourcePosition, @@ -73,22 +73,22 @@ object messages { def enablingOption(implicit ctx: Context) = ctx.settings.migration } - /** Messages ---------------------------------------------------------------- - * + /** Messages + * ======== * The role of messages is to provide the necessary details for a simple to * understand diagnostic event. Each message can be turned into a message * container (one of the above) by calling the appropriate method on them. * For instance: * * ```scala - * EmptyCatchBlock(tree).error // res: Error - * EmptyCatchBlock(tree).warning // res: Warning + * EmptyCatchBlock(tree).error(pos) // res: Error + * EmptyCatchBlock(tree).warning(pos) // res: Warning * ``` */ import dotc.ast.Trees._ import dotc.ast.untpd - /** Syntax Errors --------------------------------------------------------- */ + // Syntax Errors ---------------------------------------------------------- // abstract class EmptyCatchOrFinallyBlock(tryBody: untpd.Tree, errNo: String)(implicit ctx: Context) extends Message(errNo) { val explanation = { @@ -166,7 +166,7 @@ object messages { } } - /** Type Errors ----------------------------------------------------------- */ + // Type Errors ------------------------------------------------------------ // case class DuplicateBind(bind: untpd.Bind, tree: untpd.CaseDef)(implicit ctx: Context) extends Message("E004") { val kind = "Naming" |