A context tree contains contexts that are indexed by positions.
Insert a context with non-transparent position cpos
at correct position into a buffer of context trees.
Insert a context at correct position into a buffer of context trees.
Insert a context at correct position into a buffer of context trees.
If the context
has a transparent position, add it multiple times
at the positions of all its solid descendant trees.
Returns the most precise context possible for the given pos
.
Returns the most precise context possible for the given pos
.
It looks for the finest ContextTree containing pos
, and then look inside
this ContextTree for a child ContextTree located immediately before pos
.
If such a child exists, returns its context, otherwise returns the context of
the parent ContextTree.
This is required to always return a context which contains the all the imports
declared up to pos
(see SI-7280 for a test case).
Can return None if pos
is before any valid Scala code.
Returns the ContextTree containing pos
, or the ContextTree positioned just before pos
,
or None if pos
is located before all ContextTrees.
(contextTrees: StringAdd).self
(contextTrees: StringFormat).self
(contextTrees: ArrowAssoc[ContextTrees]).x
(Since version 2.10.0) Use leftOfArrow
instead
(contextTrees: Ensuring[ContextTrees]).x
(Since version 2.10.0) Use resultOfEnsuring
instead