MCPcopy Create free account
hub / github.com/aitjcize/cppman / _parse_expression

Method _parse_expression

cppman/main.py:319–340  ·  view source on GitHub ↗

split expression into prefix and expression tested with ``` operator== != std::rel_ops::operator!= std::atomic::operator= std::array::operator[] std::function::operator() std::vec

(self, expr)

Source from the content-addressed store, hash-verified

317 return html.unescape(name)
318
319 def _parse_expression(self, expr):
320 """
321 split expression into prefix and expression
322 tested with
323 ```
324 operator==
325 !=
326 std::rel_ops::operator!=
327 std::atomic::operator=
328 std::array::operator[]
329 std::function::operator()
330 std::vector::at
331 std::relational operators
332 std::vector::begin
333 std::abs(float)
334 std::fabs()
335 ```
336 """
337 m = re.match(r'^(.*?(?:::)?(?:operator)?)((?:::[^:]*|[^:]*)?)$', expr)
338 prefix = m.group(1)
339 tail = m.group(2)
340 return [prefix, tail]
341
342 def _parse_title(self, title):
343 """

Callers 1

_parse_titleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected