parsi/fn/expect.hpp
-
namespace parsi
Functions
-
template<std::size_t SizeV>
constexpr auto expect(const char (&str)[SizeV]) noexcept -> fn::ExpectFixedString<SizeV, const char> Creates a parser that expects the stream to start with the given fixed string. Parser’s expected string is fixed and cannot be changed. better performance for string literals.
-
template<std::size_t SizeV, typename CharT = const char>
constexpr auto expect(FixedString<SizeV, CharT> expected) noexcept -> fn::ExpectFixedString<SizeV, CharT> Creates a parser that expects the stream to start with the given fixed string. Parser’s expected string is fixed and cannot be changed. better performance for string literals.
-
inline auto expect(std::string expected) noexcept -> fn::ExpectString
Creates a parser that expects the stream to start with the given string.
-
constexpr auto expect(char expected) noexcept -> fn::ExpectChar
Creates a parser that expects the stream to start with the given character.
-
constexpr auto expect_not(char expected) noexcept -> fn::ExpectChar
Creates a parser that expects the stream to start with the given character.
-
constexpr auto expect(Charset expected) noexcept -> fn::ExpectCharset
Creates a parser that expects the stream to start with a character the is in the given charset.
-
constexpr auto expect_not(Charset expected) noexcept -> fn::ExpectCharset
Creates a parser that expects the stream to start with a character the is in the given charset.
-
namespace fn
-
struct ExpectChar
- #include <expect.hpp>
A parser that expects the stream to start with the given character.
-
struct ExpectCharset
- #include <expect.hpp>
A parser that expects the stream to start with a character that is in the given charset.
-
template<std::size_t SizeV, typename CharT = const char>
struct ExpectFixedString -
Public Members
-
FixedString<SizeV, CharT> expected
-
FixedString<SizeV, CharT> expected
-
struct ExpectChar
-
template<std::size_t SizeV>