mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
json-related refactor
This commit is contained in:
parent
45862269e7
commit
7fdacffe53
7 changed files with 30 additions and 35 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#include "json.hpp"
|
||||
|
||||
#include "commons.hpp"
|
||||
|
||||
#include "../data/dynamic.hpp"
|
||||
#include "../util/stringutil.hpp"
|
||||
|
||||
|
|
@ -240,11 +242,11 @@ Value Parser::parseValue() {
|
|||
throw error("unexpected character '"+std::string({next})+"'");
|
||||
}
|
||||
|
||||
std::unique_ptr<Map> json::parse(const std::string& filename, const std::string& source) {
|
||||
dynamic::Map_sptr json::parse(const std::string& filename, const std::string& source) {
|
||||
Parser parser(filename, source);
|
||||
return parser.parse();
|
||||
}
|
||||
|
||||
std::unique_ptr<Map> json::parse(const std::string& source) {
|
||||
dynamic::Map_sptr json::parse(const std::string& source) {
|
||||
return parse("<string>", source);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue