Config file and package tracking utility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
617 B

/*
* Copyright (C) 2022 Riyyi
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <cstddef> // size_t
#include <string_view>
#include "util/genericlexer.h"
namespace Util::Format {
class Builder;
class Parser final : public GenericLexer {
public:
Parser(std::string_view format, size_t parameterCount);
virtual ~Parser();
void checkFormatParameterConsistency();
std::string_view consumeLiteral();
bool consumeSpecifier(std::string_view& specifier);
void applySpecifier(Builder& builder, std::string_view specifier);
private:
size_t m_parameterCount { 0 };
};
} // namespace Util::Format