| 102 | } |
| 103 | |
| 104 | std::optional<SourceLocation> parseRange(FileRepository const& _fileRepository, std::string const& _sourceUnitName, Json const& _range) |
| 105 | { |
| 106 | if (!_range.is_object()) |
| 107 | return std::nullopt; |
| 108 | std::optional<SourceLocation> start = parsePosition(_fileRepository, _sourceUnitName, _range["start"]); |
| 109 | std::optional<SourceLocation> end = parsePosition(_fileRepository, _sourceUnitName, _range["end"]); |
| 110 | if (!start || !end) |
| 111 | return std::nullopt; |
| 112 | solAssert(*start->sourceName == *end->sourceName); |
| 113 | start->end = end->end; |
| 114 | return start; |
| 115 | } |
| 116 | |
| 117 | std::string stripFileUriSchemePrefix(std::string const& _path) |
| 118 | { |
no test coverage detected