* Merges two `SourceLocation`s from location providers, given they are * provided in order of appearance. * - Returns the first one's location if only the first is provided. * - Returns a merged range of the first and the last if both are provided * and their lexers match. * - Other
(first, second)
| 26 | |
| 27 | |
| 28 | static range(first, second) { |
| 29 | if (!second) { |
| 30 | return first && first.loc; |
| 31 | } else if (!first || !first.loc || !second.loc || first.loc.lexer !== second.loc.lexer) { |
| 32 | return null; |
| 33 | } else { |
| 34 | return new SourceLocation(first.loc.lexer, first.loc.start, second.loc.end); |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | } |
| 39 |
nothing calls this directly
no outgoing calls
no test coverage detected