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

Type Members

  1. class ApplyImplicitView extends Apply

  2. class ApplyToImplicitArgs extends Apply

  3. case class AssignOrNamedArg(lhs: Tree, rhs: Tree) extends Tree with TermTree with Product with Serializable

    Either an assignment or a named argument.

  4. class ChangeOwnerTraverser extends Traverser

  5. abstract type CompilationUnit <: CompilationUnitTrait

    Definition Classes
    Trees
  6. trait CompilationUnitTrait extends AnyRef

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

    Documented definition, eliminated by analyzer

  8. class FilterTreeTraverser extends Traverser

  9. class FindTreeTraverser extends Traverser

  10. class ForeachPartialTreeTraverser extends Traverser

  11. class ForeachTreeTraverser extends Traverser

  12. class LazyTreeCopier extends TreeCopier

  13. class Locator extends Traverser

    A locator for trees with given positions.

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

  15. type Position = Position

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

  17. class StrictTreeCopier extends TreeCopier

  18. abstract class Transformer extends AnyRef

  19. class Traverser extends Traverser

    Definition Classes
    Trees → Trees
  20. abstract class TreeCopier extends AnyRef

  21. class TreeOps extends AnyRef

  22. class TreeSubstituter extends Transformer

  23. class TreeSymSubstTraverser extends Traverser

  24. class TreeSymSubstituter extends Transformer

    Substitute symbols in 'from' with symbols in 'to'.

  25. class TreeTypeSubstituter extends Traverser

  26. case class TypeTree() extends AbsTypeTree with Product with Serializable

    A synthetic term holding an arbitrary type.

  27. case class TypeTreeWithDeferredRefCheck(check: () ⇒ TypeTree) extends AbsTypeTree with Product with Serializable

    emitted by typer, eliminated by refchecks

  28. class TypedLocator extends Locator

  29. class ValidateException extends Exception

Abstract Value Members

  1. abstract def newTreePrinter(out: PrintWriter): AbsTreePrinter

    Definition Classes
    Trees

Concrete 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 Bind(sym: Symbol, body: Tree): Bind

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

    Block factory that flattens directly nested blocks.

    Block factory that flattens directly nested blocks.

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

    casedef shorthand

    casedef shorthand

    Definition Classes
    Trees
  9. 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
  10. def ClassDef(sym: Symbol, impl: Template): ClassDef

    sym

    the class symbol

    returns

    the implementation template

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

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

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

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

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

    Definition Classes
    Trees
  16. lazy val EmptyTreeTypeSubstituter: TreeTypeSubstituter

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

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

    Definition Classes
    Trees
  19. def Literal(value: Any): Literal

    Definition Classes
    Trees
  20. def Modifiers(flags: Long): Modifiers

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

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

    sym

    the class symbol

    impl

    the implementation template

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

    Factory method for object creation new tpt(args_1)...(args_n) A New(t, as) is expanded to: (new t).<init>(as)

    Factory method for object creation new tpt(args_1)...(args_n) A New(t, as) is expanded to: (new t).<init>(as)

    Definition Classes
    Trees
  24. lazy val NoMods: Modifiers

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

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

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

    Definition Classes
    Trees
  28. 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
  29. def This(sym: Symbol): Tree

    Definition Classes
    Trees
  30. 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
  31. 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
  32. def TypeTree(tp: Type): TypeTree

    Definition Classes
    Trees
  33. object TypeTree extends TypeTreeExtractor with Serializable

    Definition Classes
    Trees → Trees
  34. def ValDef(sym: Symbol): ValDef

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

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

    Definition Classes
    Any
  37. 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
  38. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  39. object emptyValDef extends ValDef

  40. 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
  41. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  44. 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

  45. def flagsIntoString(flags: Long, privateWithin: String): String

    Attributes
    protected
    Definition Classes
    Trees → Trees
  46. final def getClass(): java.lang.Class[_]

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

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

    Definition Classes
    Any
  49. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  50. final def notify(): Unit

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

    Definition Classes
    AnyRef
  52. object posAssigner extends Traverser

  53. def rangePos(source: SourceFile, start: Int, point: Int, end: Int): RangePosition

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

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

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

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

    Definition Classes
    Trees
  56. object resetPos extends Traverser

  57. def solidDescendants(tree: Tree): List[Tree]

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

    Definition Classes
    AnyRef
  59. def toString(): String

    Definition Classes
    AnyRef → Any
  60. val treeCopy: LazyTreeCopier

    Definition Classes
    Trees
  61. object treeInfo extends TreeInfo

  62. lazy val treePrinter: TreePrinter

    Definition Classes
    Trees
  63. implicit def treeWrapper(tree: Tree): TreeOps

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

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  68. 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
  69. 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

Inherited from Positions

Inherited from Trees

Inherited from Trees

Inherited from AnyRef

Inherited from Any