summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-09-26 10:54:03 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-09-27 15:53:18 +0200
commitee1ca007c73d941c88c893637263b7d4b5fc842e (patch)
tree91045ea53ba1aa2949fb0459112873667c1d7de9 /src/reflect
parent7e5646388243522bef8f4a1a1e255c7d8e30236d (diff)
downloadscala-ee1ca007c73d941c88c893637263b7d4b5fc842e.tar.gz
scala-ee1ca007c73d941c88c893637263b7d4b5fc842e.tar.bz2
scala-ee1ca007c73d941c88c893637263b7d4b5fc842e.zip
moves Context.ParseError outside the cake
I did this for ReificationError a long time ago. Must've probably forgot to do the same for ParseError.
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/scala/reflect/macros/Parsers.scala14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/reflect/scala/reflect/macros/Parsers.scala b/src/reflect/scala/reflect/macros/Parsers.scala
index 1742d07b60..c2d4d8a3ab 100644
--- a/src/reflect/scala/reflect/macros/Parsers.scala
+++ b/src/reflect/scala/reflect/macros/Parsers.scala
@@ -5,14 +5,10 @@ trait Parsers {
self: Context =>
/** .. */
- // todo. distinguish between `parse` and `parse`
+ // todo. distinguish between parsing an expression and parsing arbitrary code
+ // for example, parsing in expression mode will fail on packages
def parse(code: String): Tree
+}
- /** Represents an error during parsing
- */
- type ParseError <: Throwable
- val ParseError: ParseErrorExtractor
- abstract class ParseErrorExtractor {
- def unapply(error: ParseError): Option[(Position, String)]
- }
-} \ No newline at end of file
+// should be path-dependent, otherwise exception handling becomes a mess
+case class ParseError(val pos: scala.reflect.api.Position, val msg: String) extends Throwable(msg)