mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
BasicParser now uses string_view
This commit is contained in:
parent
65e85f362c
commit
5da2a30326
9 changed files with 45 additions and 43 deletions
|
|
@ -11,6 +11,16 @@
|
|||
using namespace json;
|
||||
using namespace dynamic;
|
||||
|
||||
class Parser : BasicParser {
|
||||
std::unique_ptr<dynamic::List> parseList();
|
||||
std::unique_ptr<dynamic::Map> parseObject();
|
||||
dynamic::Value parseValue();
|
||||
public:
|
||||
Parser(std::string_view filename, std::string_view source);
|
||||
|
||||
std::unique_ptr<dynamic::Map> parse();
|
||||
};
|
||||
|
||||
inline void newline(
|
||||
std::stringstream& ss,
|
||||
bool nice, uint indent,
|
||||
|
|
@ -126,7 +136,7 @@ std::string json::stringify(
|
|||
return ss.str();
|
||||
}
|
||||
|
||||
Parser::Parser(const std::string& filename, const std::string& source)
|
||||
Parser::Parser(std::string_view filename, std::string_view source)
|
||||
: BasicParser(filename, source) {
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue