Parse a function call.

Synopsis

Declared in <script/parsing.h>

bool
Func(
    std::string const& str,
    std::span<char const>& sp);

Description

If sp's initial part matches str + "(", and sp ends with ")", sp is updated to be the section between the braces, and true is returned. Otherwise sp is unmodified and false is returned.

Return Value

true if sp is a call to str, false otherwise.

Parameters

Name

Description

str

The function name to match against the start of sp.

sp

The input span; on a match it is narrowed to the contents between the parentheses.

Created with MrDocs