Bitcoin Core 28.99.0
P2P Digital Currency
|
Functions | |
bool | Const (const std::string &str, Span< const char > &sp) |
Parse a constant. More... | |
bool | Func (const std::string &str, Span< const char > &sp) |
Parse a function call. More... | |
Span< const char > | Expr (Span< const char > &sp) |
Extract the expression that sp begins with. More... | |
bool script::Const | ( | const std::string & | str, |
Span< const char > & | sp | ||
) |
Parse a constant.
If sp's initial part matches str, sp is updated to skip that part, and true is returned. Otherwise sp is unmodified and false is returned.
Definition at line 15 of file parsing.cpp.
Extract the expression that sp begins with.
This function will return the initial part of sp, up to (but not including) the first comma or closing brace, skipping ones that are surrounded by braces. So for example, for "foo(bar(1),2),3" the initial part "foo(bar(1),2)" will be returned. sp will be updated to skip the initial part that is returned.
Definition at line 33 of file parsing.cpp.
bool script::Func | ( | const std::string & | str, |
Span< const char > & | sp | ||
) |
Parse a function call.
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.
Definition at line 24 of file parsing.cpp.