diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-09-15 19:20:11 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-10-10 13:25:33 +0200 |
commit | 1946f94d34a929055c2f0d2dd231c5f5e634c536 (patch) | |
tree | 551615127305ce648af3942b225bdbe63e84c8c8 /src/dotty/tools/dotc/parsing/Parsers.scala | |
parent | c9a8bb8d783d288ae2c165b8eefb3ca47c372c4e (diff) | |
download | dotty-1946f94d34a929055c2f0d2dd231c5f5e634c536.tar.gz dotty-1946f94d34a929055c2f0d2dd231c5f5e634c536.tar.bz2 dotty-1946f94d34a929055c2f0d2dd231c5f5e634c536.zip |
Change layout of ErrorMessages
Diffstat (limited to 'src/dotty/tools/dotc/parsing/Parsers.scala')
-rw-r--r-- | src/dotty/tools/dotc/parsing/Parsers.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/parsing/Parsers.scala b/src/dotty/tools/dotc/parsing/Parsers.scala index e4378d82b..48422650c 100644 --- a/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/src/dotty/tools/dotc/parsing/Parsers.scala @@ -17,7 +17,7 @@ import ast.Trees._ import Decorators._ import StdNames._ import util.Positions._ -import reporting.ErrorExplanations._ +import reporting.ErrorMessages._ import Constants._ import ScriptParsers._ import Comments._ @@ -28,6 +28,7 @@ import rewrite.Rewrites.patch object Parsers { import ast.untpd._ + import reporting.ErrorMessages.Syntax._ case class OpInfo(operand: Tree, operator: Name, offset: Offset) @@ -98,7 +99,7 @@ object Parsers { /** Issue an error at given offset if beyond last error offset * and update lastErrorOffset. */ - def syntaxError(expl: Explanation, offset: Int = in.offset): Unit = + def syntaxError(expl: ErrorMessage, offset: Int = in.offset): Unit = if (offset > lastErrorOffset) { syntaxError(expl, Position(offset)) lastErrorOffset = in.offset @@ -107,7 +108,7 @@ object Parsers { /** Unconditionally issue an error at given position, without * updating lastErrorOffset. */ - def syntaxError(expl: Explanation, pos: Position): Unit = + def syntaxError(expl: ErrorMessage, pos: Position): Unit = ctx.explainError(expl, source atPos pos) } @@ -214,7 +215,7 @@ object Parsers { } } - def warning(msg: Explanation, offset: Int = in.offset) = + def warning(msg: ErrorMessage, offset: Int = in.offset) = ctx.explainWarning(msg, source atPos Position(offset)) def deprecationWarning(msg: String, offset: Int = in.offset) = |