fix render error position in templates

This commit is contained in:
Lars Berscheid
2020-06-30 08:51:13 +02:00
parent c4d99c9455
commit bb613e29ba
5 changed files with 35 additions and 41 deletions

View File

@@ -119,11 +119,11 @@ struct Node {
json value;
std::string str;
nonstd::string_view view;
size_t pos;
explicit Node(Op op, unsigned int args = 0) : op(op), args(args), flags(0) {}
explicit Node(Op op, nonstd::string_view str, unsigned int flags) : op(op), args(0), flags(flags), str(str), view(str) {}
explicit Node(Op op, json &&value, unsigned int flags) : op(op), args(0), flags(flags), value(std::move(value)) {}
explicit Node(Op op, unsigned int args, size_t pos) : op(op), args(args), flags(0), pos(pos) {}
explicit Node(Op op, nonstd::string_view str, unsigned int flags, size_t pos) : op(op), args(0), flags(flags), str(str), pos(pos) {}
explicit Node(Op op, json &&value, unsigned int flags, size_t pos) : op(op), args(0), flags(flags), value(std::move(value)), pos(pos) {}
};
} // namespace inja