trait Positions extends api.Positions
Handling range positions atPos, the main method in this trait, will add positions to a tree, and will ensure the following properties:
- All nodes between the root of the tree and nodes that already have positions will be assigned positions. 2. No node which already has a position will be assigned a different range; however a RangePosition might become a TransparentPosition. 3. The position of each assigned node includes the positions of each of its children. 4. The positions of all solid descendants of children of an assigned node are mutually non-overlapping.
Here, the solid descendant of a node are:
If the node has a TransparentPosition, the solid descendants of all its children Otherwise, the singleton consisting of the node itself.
- Self Type
- SymbolTable
- Alphabetic
- By Inheritance
- Positions
- Positions
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- abstract class ChildSolidDescendantsCollector extends SymbolTable.Traverser
-
class
DefaultPosAssigner extends SymbolTable.Traverser with SymbolTable.PosAssigner
- Attributes
- protected
-
class
Locator extends SymbolTable.Traverser
A locator for trees with given positions.
A locator for trees with given positions. Given a position
pos
, locator.apply returns the smallest tree that enclosespos
. - trait PosAssigner extends SymbolTable.Traverser
-
type
Position = util.Position
Defines a universe-specific notion of positions.
Defines a universe-specific notion of positions. The main documentation entry about positions is located at scala.reflect.api.Position.
- class TypedLocator extends SymbolTable.Locator
- class ValidateException extends Exception
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
NoPosition: util.NoPosition.type
A special "missing" position.
- implicit val PositionTag: ClassTag[SymbolTable.Position]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
atPos[T <: SymbolTable.Tree](pos: SymbolTable.Position)(tree: T): T
Position a tree.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def ensureNonOverlapping(tree: SymbolTable.Tree, others: List[SymbolTable.Tree], focus: Boolean): Unit
-
def
ensureNonOverlapping(tree: SymbolTable.Tree, others: List[SymbolTable.Tree]): Unit
Ensure that given tree has no positions that overlap with any of the positions of
others
.Ensure that given tree has no positions that overlap with any of the positions of
others
. This is done by shortening the range, assigning TransparentPositions to some of the nodes intree
or focusing on the position. -
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
lazy val
posAssigner: SymbolTable.PosAssigner
- Attributes
- protected[this]
- def rangePos(source: SourceFile, start: Int, point: Int, end: Int): SymbolTable.Position
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def useOffsetPositions: Boolean
- def validatePositions(tree: SymbolTable.Tree): Unit
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
wrappingPos(trees: List[SymbolTable.Tree]): SymbolTable.Position
A position that wraps the non-empty set of trees.
A position that wraps the non-empty set of trees. The point of the wrapping position is the point of the first trees' position. If some of the trees are non-synthetic, returns a range position enclosing the non-synthetic trees Otherwise returns a synthetic offset position to point.
- def wrappingPos(default: SymbolTable.Position, trees: List[SymbolTable.Tree], focus: Boolean): SymbolTable.Position
-
def
wrappingPos(default: SymbolTable.Position, trees: List[SymbolTable.Tree]): SymbolTable.Position
A position that wraps a set of trees.