1 #ifndef INCLUDE_INJA_CONFIG_HPP_
2 #define INCLUDE_INJA_CONFIG_HPP_
7 #include "template.hpp"
15 std::string statement_open {
"{%"};
16 std::string statement_open_no_lstrip {
"{%+"};
17 std::string statement_open_force_lstrip {
"{%-"};
18 std::string statement_close {
"%}"};
19 std::string statement_close_force_rstrip {
"-%}"};
20 std::string line_statement {
"##"};
21 std::string expression_open {
"{{"};
22 std::string expression_open_force_lstrip {
"{{-"};
23 std::string expression_close {
"}}"};
24 std::string expression_close_force_rstrip {
"-}}"};
25 std::string comment_open {
"{#"};
26 std::string comment_open_force_lstrip {
"{#-"};
27 std::string comment_close {
"#}"};
28 std::string comment_close_force_rstrip {
"-#}"};
29 std::string open_chars {
"#{"};
31 bool trim_blocks {
false};
32 bool lstrip_blocks {
false};
34 void update_open_chars() {
36 if (open_chars.find(line_statement[0]) == std::string::npos) {
37 open_chars += line_statement[0];
39 if (open_chars.find(statement_open[0]) == std::string::npos) {
40 open_chars += statement_open[0];
42 if (open_chars.find(statement_open_no_lstrip[0]) == std::string::npos) {
43 open_chars += statement_open_no_lstrip[0];
45 if (open_chars.find(statement_open_force_lstrip[0]) == std::string::npos) {
46 open_chars += statement_open_force_lstrip[0];
48 if (open_chars.find(expression_open[0]) == std::string::npos) {
49 open_chars += expression_open[0];
51 if (open_chars.find(expression_open_force_lstrip[0]) == std::string::npos) {
52 open_chars += expression_open_force_lstrip[0];
54 if (open_chars.find(comment_open[0]) == std::string::npos) {
55 open_chars += comment_open[0];
57 if (open_chars.find(comment_open_force_lstrip[0]) == std::string::npos) {
58 open_chars += comment_open_force_lstrip[0];
67 bool search_included_templates_in_files {
true};
69 std::function<
Template(
const std::string&,
const std::string&)> include_callback;
76 bool throw_at_missing_includes {
true};
Class for lexer configuration.
Definition: config.hpp:14
Class for parser configuration.
Definition: config.hpp:66
Class for render configuration.
Definition: config.hpp:75
The main inja Template.
Definition: template.hpp:17