MCPcopy Create free account
hub / github.com/argotorg/solidity / parseRange

Function parseRange

libsolidity/lsp/Utils.cpp:104–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104std::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
117std::string stripFileUriSchemePrefix(std::string const& _path)
118{

Callers 1

Calls 1

parsePositionFunction · 0.85

Tested by

no test coverage detected