scala.tools.nsc.interactive

RangePositions

trait RangePositions extends Trees with Positions

Handling range positions atPos, the main method in this trait, will add positions to a tree, and will ensure the following properties:

  1. 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
RangePositions with Global
Source
RangePositions.scala
Linear Supertypes
Positions, Positions, Positions, Trees, Trees, Trees, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. RangePositions
  2. Positions
  3. Positions
  4. Positions
  5. Trees
  6. Trees
  7. Trees
  8. AnyRef
  9. Any
Visibility
  1. Public
  2. All

Type Members

  1. class ChangeOwnerTraverser extends Traverser

  2. case class DocDef(comment: DocComment, definition: Tree) extends Tree with Product with Serializable

    Documented definition, eliminated by analyzer

  3. class ForeachPartialTreeTraverser extends Traverser

  4. class LazyTreeCopier extends LazyTreeCopier with TreeCopier

    Definition Classes
    Trees → Trees
  5. class Locator extends Traverser

    A locator for trees with given positions.

  6. case class Modifiers(flags: Long, privateWithin: Name, annotations: List[Tree]) extends AbsModifiers with HasFlags with Product with Serializable

  7. case class Parens(args: List[Tree]) extends Tree with Product with Serializable

    Only used during parsing

  8. type Position = Position

    Definition Classes
    Positions → Positions
  9. case class Range(pos: Position, tree: Tree) extends Product with Serializable

  10. case class ReferenceToBoxed(idt: Ident) extends Tree with TermTree with Product with Serializable

    Marks underlying reference to id as boxed.

  11. case class SelectFromArray(qualifier: Tree, name: Name, erasure: Type) extends Tree with TermTree with RefTree with Product with Serializable

    Array selection <qualifier> .

  12. class StrictTreeCopier extends StrictTreeCopier with TreeCopier

    Definition Classes
    Trees → Trees
  13. class Transformer extends Transformer

    Definition Classes
    Trees → Trees
  14. trait TreeCopier extends TreeCopierOps

    Definition Classes
    Trees → Trees
  15. class TreeOps extends AnyRef

  16. class TreeSubstituter extends Transformer

  17. class TreeSymSubstTraverser extends TypeMapTreeSubstituter

  18. class TreeSymSubstituter extends Transformer

    Substitute symbols in from with symbols in to.

  19. class TreeTypeSubstituter extends TypeMapTreeSubstituter

  20. class TypeMapTreeSubstituter extends Traverser

  21. case class TypeTreeWithDeferredRefCheck(check: () ⇒ TypeTree) extends Tree with TypTree with Product with Serializable

    emitted by typer, eliminated by refchecks

  22. class TypedLocator extends Locator

  23. class ValidateException extends Exception

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def Apply(sym: Symbol, args: Tree*): Tree

    Definition Classes
    Trees
  7. def Bind(sym: Symbol, body: Tree): Bind

    Definition Classes
    Trees
  8. def Block(stats: Tree*): Block

    Block factory that flattens directly nested blocks.

    Block factory that flattens directly nested blocks.

    Definition Classes
    Trees
  9. def CaseDef(pat: Tree, body: Tree): CaseDef

    casedef shorthand

    casedef shorthand

    Definition Classes
    Trees
  10. def ClassDef(sym: Symbol, constrMods: Modifiers, vparamss: List[List[ValDef]], argss: List[List[Tree]], body: List[Tree], superPos: Position): ClassDef

    Construct class definition with given class symbol, value parameters, supercall arguments and template body.

    Construct class definition with given class symbol, value parameters, supercall arguments and template body.

    sym

    the class symbol

    constrMods

    the modifiers for the class constructor, i.e. as in class C private (...)

    vparamss

    the value parameters -- if they have symbols they should be owned by sym

    argss

    the supercall arguments

    body

    the template statements without primary constructor and value parameter fields.

    Definition Classes
    Trees
  11. def ClassDef(sym: Symbol, impl: Template): ClassDef

    sym

    the class symbol

    returns

    the implementation template

    Definition Classes
    Trees
  12. def DefDef(sym: Symbol, rhs: (List[List[Symbol]]) ⇒ Tree): DefDef

    Definition Classes
    Trees
  13. def DefDef(sym: Symbol, rhs: Tree): DefDef

    Definition Classes
    Trees
  14. def DefDef(sym: Symbol, mods: Modifiers, rhs: Tree): DefDef

    Definition Classes
    Trees
  15. def DefDef(sym: Symbol, vparamss: List[List[ValDef]], rhs: Tree): DefDef

    Definition Classes
    Trees
  16. def DefDef(sym: Symbol, mods: Modifiers, vparamss: List[List[ValDef]], rhs: Tree): DefDef

    Definition Classes
    Trees
  17. lazy val EmptyTreeTypeSubstituter: TreeTypeSubstituter

    Definition Classes
    Trees
  18. def Ident(sym: Symbol): Ident

    Definition Classes
    Trees
  19. def Ident(name: String): Ident

    Definition Classes
    Trees
  20. def LabelDef(sym: Symbol, params: List[Symbol], rhs: Tree): LabelDef

    Definition Classes
    Trees
  21. def Modifiers(mods: Set[Modifier], privateWithin: Name, annotations: List[Tree]): Modifiers

    Definition Classes
    Trees → Trees
  22. def Modifiers(flags: Long): Modifiers

    Definition Classes
    Trees
  23. def Modifiers(flags: Long, privateWithin: Name): Modifiers

    Definition Classes
    Trees
  24. def ModuleDef(sym: Symbol, impl: Template): ModuleDef

    sym

    the class symbol

    impl

    the implementation template

    Definition Classes
    Trees
  25. def New(tpe: Type, args: Tree*): Tree

    Definition Classes
    Trees
  26. def New(sym: Symbol, args: Tree*): Tree

    0-1 argument list new, based on a symbol or type.

    0-1 argument list new, based on a symbol or type.

    Definition Classes
    Trees
  27. def New(tpt: Tree, argss: List[List[Tree]]): Tree

    Definition Classes
    Trees
  28. lazy val NoMods: Modifiers

    Definition Classes
    Trees
  29. val NoPosition: tools.nsc.util.NoPosition.type

    Definition Classes
    Positions → Positions
  30. def Select(qualifier: Tree, sym: Symbol): Select

    Definition Classes
    Trees
  31. def Select(qualifier: Tree, name: String): Select

    Definition Classes
    Trees
  32. def Super(sym: Symbol, mix: TypeName): Tree

    Definition Classes
    Trees
  33. def Template(parents: List[Tree], self: ValDef, constrMods: Modifiers, vparamss: List[List[ValDef]], argss: List[List[Tree]], body: List[Tree], superPos: Position): Template

    Generates a template with constructor corresponding to

    Generates a template with constructor corresponding to

    constrmods (vparams1_) ... (vparams_n) preSuper { presupers } extends superclass(args_1) ... (args_n) with mixins { self => body }

    This gets translated to

    extends superclass with mixins { self => presupers' // presupers without rhs vparamss // abstract fields corresponding to value parameters def <init>(vparamss) { presupers super.<init>(args) } body }

    Definition Classes
    Trees
  34. def This(sym: Symbol): Tree

    Definition Classes
    Trees
  35. def TypeDef(sym: Symbol): TypeDef

    A TypeDef node which defines abstract type or type parameter for given sym

    A TypeDef node which defines abstract type or type parameter for given sym

    Definition Classes
    Trees
  36. def TypeDef(sym: Symbol, rhs: Tree): TypeDef

    A TypeDef node which defines given sym with given tight hand side rhs.

    A TypeDef node which defines given sym with given tight hand side rhs.

    Definition Classes
    Trees
  37. def TypeTree(tp: Type): TypeTree

    Definition Classes
    Trees
  38. def ValDef(sym: Symbol): ValDef

    Definition Classes
    Trees
  39. def ValDef(sym: Symbol, rhs: Tree): ValDef

    Definition Classes
    Trees
  40. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  41. def atPos[T <: Tree](pos: Position)(tree: T): T

    Position a tree.

    Position a tree. This means: Set position of a node and position all its unpositioned children.

    Definition Classes
    RangePositionsTrees
  42. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  43. def duplicateTree(tree: Tree): Tree

    Attributes
    protected[scala]
    Definition Classes
    Trees → Trees
  44. object emptyValDef extends ValDef

    Definition Classes
    Trees → Trees
  45. def ensureNonOverlapping(tree: Tree, others: List[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 or assigning TransparentPositions to some of the nodes in tree.

    Definition Classes
    RangePositionsPositions
  46. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  47. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  48. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  49. def findOverlapping(cts: List[Tree]): List[(Tree, Tree)]

    Does given list of trees have mutually non-overlapping positions? pre: None of the trees is transparent

  50. def focusPos(pos: Position): Position

    Definition Classes
    PositionsPositions
  51. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  52. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  53. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  54. def isRangePos(pos: Position): Boolean

    Definition Classes
    PositionsPositions
  55. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  56. def newLazyTreeCopier: TreeCopier

    Definition Classes
    Trees → Trees
  57. def newStrictTreeCopier: TreeCopier

    Definition Classes
    Trees → Trees
  58. final def notify(): Unit

    Definition Classes
    AnyRef
  59. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  60. def rangePos(source: SourceFile, start: Int, point: Int, end: Int): RangePosition

    Definition Classes
    RangePositionsPositions
  61. def resetAllAttrs[A <: Tree](x: A): A

    resets symbol and tpe fields in a tree, @see ResetAttrs

    resets symbol and tpe fields in a tree, @see ResetAttrs

    Definition Classes
    Trees
  62. def resetLocalAttrs[A <: Tree](x: A): A

    Definition Classes
    Trees
  63. object resetPos extends Traverser

  64. def showPos(pos: Position): String

    Definition Classes
    PositionsPositions
  65. def solidDescendants(tree: Tree): List[Tree]

  66. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  67. def toString(): String

    Definition Classes
    AnyRef → Any
  68. val treeCopy: TreeCopier

    Definition Classes
    Trees
  69. object treeInfo extends TreeInfo

  70. implicit def treeOps(tree: Tree): TreeOps

    Definition Classes
    Trees
  71. lazy val treePrinter: TreePrinter

    Definition Classes
    Trees
  72. def validatePositions(tree: Tree): Unit

    Definition Classes
    RangePositionsPositions
  73. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  74. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  75. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  76. def wrappingPos(trees: List[Tree]): Position

    A position that wraps a non-empty set of trees.

    A position that wraps a 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 ranges, returns a range position enclosing all ranges Otherwise returns first tree's position.

    Definition Classes
    RangePositionsPositions
  77. def wrappingPos(default: Position, trees: List[Tree]): Position

    A position that wraps a set of trees.

    A position that wraps a set of trees. The point of the wrapping position is the point of the default position. If some of the trees are ranges, returns a range position enclosing all ranges Otherwise returns default position.

    Definition Classes
    RangePositionsPositions
  78. def xtransform(transformer: Transformer, tree: Tree): Tree

    Attributes
    protected
    Definition Classes
    Trees → Trees
  79. def xtraverse(traverser: Traverser, tree: Tree): Unit

    Attributes
    protected
    Definition Classes
    Trees → Trees

Inherited from Positions

Inherited from Positions

Inherited from Positions

Inherited from Trees

Inherited from Trees

Inherited from Trees

Inherited from AnyRef

Inherited from Any