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

Function parseLineColumn

libsolidity/lsp/Utils.cpp:34–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32using namespace langutil;
33
34std::optional<LineColumn> parseLineColumn(Json const& _lineColumn)
35{
36 if (_lineColumn.is_object() && _lineColumn["line"].is_number_integer() && _lineColumn["character"].is_number_integer())
37 return LineColumn{_lineColumn["line"].get<int>(), _lineColumn["character"].get<int>()};
38 else
39 return std::nullopt;
40}
41
42Json toJson(LineColumn const& _pos)
43{

Callers 2

parsePositionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected