summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@gmail.com>2012-10-30 14:04:43 +0100
committerHeather Miller <heather.miller@epfl.ch>2012-11-02 15:00:20 +0100
commit554f8bb0389f766c3d0778b1b323fafa3097a2f6 (patch)
treea9a35424207d7a2b90fb20ee32a8a65031cd0816 /src/reflect
parent71f02cd041e9c20d309686fcccf830a0f919f641 (diff)
downloadscala-554f8bb0389f766c3d0778b1b323fafa3097a2f6.tar.gz
scala-554f8bb0389f766c3d0778b1b323fafa3097a2f6.tar.bz2
scala-554f8bb0389f766c3d0778b1b323fafa3097a2f6.zip
Remove implementation details from Position (they are still under reflection.internal). It probably needs more cleanup of the api wrt to ranges etc but let's leave it for later
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/scala/reflect/api/Position.scala31
1 files changed, 2 insertions, 29 deletions
diff --git a/src/reflect/scala/reflect/api/Position.scala b/src/reflect/scala/reflect/api/Position.scala
index 61d643b449..bac191d2b5 100644
--- a/src/reflect/scala/reflect/api/Position.scala
+++ b/src/reflect/scala/reflect/api/Position.scala
@@ -6,40 +6,13 @@ import scala.reflect.macros.Attachments
/** Position tracks the origin of [[Symbols#Symbol symbols]] and [[Trees#Tree tree nodes]]. They are commonly used when
* displaying warnings and errors, to indicate the incorrect point in the program.
*
- * A position indicates the [[source source file]] and an [[point offset]]. A position may be
+ * A position indicates the [[source source file]] and a [[point offset]]. A position may be
* undefined, which means it's pointing to the [[Positions#NoPosition]] element.
*
* <b>Please note that this trait may be refactored in future versions of the Scala reflection API.</b>
*
* @see [[http://docs.scala-lang.org/overviews/reflection/names-exprs-scopes-more.html]]
*
- * The compiler adds more information to positions, such a ranges in the source file and defines different types of
- * positions depending on how a symbol or tree node was generated. The guide fully describes compiler-generated positions.
- *
- * - INV1: A tree with an offset position never contains a child
- * with a range position
- * - INV2: If the child of a tree with a range position also has a range position,
- * then the child's range is contained in the parent's range.
- * - INV3: Opaque range positions of children of the same node are non-overlapping
- * (this means their overlap is at most a single point).
- *
- * The following tests are useful on positions:
- * `pos.isDefined` true if position is not a NoPosition,
- * `pos.isRange` true if position is a range,
- * `pos.isOpaqueRange` true if position is an opaque range,
- *
- * There are also convenience methods, such as
- * `pos.startOrPoint`,
- * `pos.endOrPoint`,
- * `pos.pointOrElse(default)`.
- * These are less strict about the kind of position on which they can be applied.
- *
- * The following conversion methods are often used:
- * `pos.focus` converts a range position to an offset position, keeping its point;
- * returns all other positions unchanged,
- * `pos.makeTransparent` converts an opaque range position into a transparent one.
- * returns all other positions unchanged.
- *
* @groupname Common Commonly used methods
*/
trait Position extends Attachments {
@@ -70,7 +43,7 @@ trait Position extends Attachments {
def isTransparent: Boolean
/** Is this position a non-transparent range position? */
- def isOpaqueRange: Boolean
+ def isOpaqueRange: Boolean
/** If opaque range, make this position transparent. */
def makeTransparent: Pos