static load file

This commit is contained in:
pantor
2023-09-03 16:26:32 +02:00
parent c2ad85db6d
commit 3e0c30f27f
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -100,7 +100,7 @@ public:
Template parse_template(const std::string& filename) {
Parser parser(parser_config, lexer_config, template_storage, function_storage);
auto result = Template(parser.load_file(input_path + static_cast<std::string>(filename)));
auto result = Template(Parser::load_file(input_path + static_cast<std::string>(filename)));
parser.parse_into_template(result, input_path + static_cast<std::string>(filename));
return result;
}
@@ -157,7 +157,7 @@ public:
std::string load_file(const std::string& filename) {
Parser parser(parser_config, lexer_config, template_storage, function_storage);
return parser.load_file(input_path + filename);
return Parser::load_file(input_path + filename);
}
json load_json(const std::string& filename) {
+1 -1
View File
@@ -634,7 +634,7 @@ public:
sub_parser.parse_into(tmpl, path);
}
std::string load_file(const std::string& filename) {
static std::string load_file(const std::string& filename) {
std::ifstream file;
file.open(filename);
if (file.fail()) {