SourceRange returns the source range for the traversal.
()
| 161 | |
| 162 | // SourceRange returns the source range for the traversal. |
| 163 | func (t Traversal) SourceRange() Range { |
| 164 | if len(t) == 0 { |
| 165 | // Nothing useful to return here, but we'll return something |
| 166 | // that's correctly-typed at least. |
| 167 | return Range{} |
| 168 | } |
| 169 | |
| 170 | return RangeBetween(t[0].SourceRange(), t[len(t)-1].SourceRange()) |
| 171 | } |
| 172 | |
| 173 | // TraversalSplit represents a pair of traversals, the first of which is |
| 174 | // an absolute traversal and the second of which is relative to the first. |
nothing calls this directly
no test coverage detected