mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add YAML parser
This commit is contained in:
parent
239181bb64
commit
2aea19febd
8 changed files with 406 additions and 25 deletions
|
|
@ -7,16 +7,20 @@ template <typename CharT>
|
|||
class BasicParser {
|
||||
using StringT = std::basic_string<CharT>;
|
||||
using StringViewT = std::basic_string_view<CharT>;
|
||||
|
||||
void skipWhitespaceHashComment(bool newline = true);
|
||||
protected:
|
||||
std::string_view filename;
|
||||
StringViewT source;
|
||||
uint pos = 0;
|
||||
uint line = 1;
|
||||
uint linestart = 0;
|
||||
bool hashComment = false;
|
||||
|
||||
virtual void skipWhitespace();
|
||||
void skipWhitespace(bool newline = true);
|
||||
void skip(size_t n);
|
||||
void skipLine();
|
||||
void skipEmptyLines();
|
||||
bool skipTo(const StringT& substring);
|
||||
void expect(CharT expected);
|
||||
void expect(const StringT& substring);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue