Class LocationBoundingVisitor
java.lang.Object
com.google.common.css.compiler.passes.LocationBoundingVisitor
- All Implemented Interfaces:
UniformVisitor
A pass for finding an approximation to a minimum-size SourceCodeLocation interval that contains a
given node.
In typical CssTrees c. April 2013, most nodes do not have SourceCodeLocations, but suppose we have such a node A with descendent nodes D_0, ... D_n that do have locations:
A
/ \
-----
| \
D_0 D_1
Then we know that the subtree rooted at A includes markup beginning by min_0^n(beginLocation(D_i)) and ending by max_0^n(endLocation(D_i)). Concretely, let
node getBeginCharacterIndex getEndCharacterIndex --- --- --- A ? ? D_0 5 15 D_1 17 19
Then we can estimate for A:
A 5 19
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.common.css.compiler.passes.UniformVisitor
UniformVisitor.Adapters -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LocationBoundingVisitor
public LocationBoundingVisitor()
-
-
Method Details
-
enter
- Specified by:
enterin interfaceUniformVisitor
-
leave
- Specified by:
leavein interfaceUniformVisitor
-
bound
-