mirror of
https://github.com/pantor/inja.git
synced 2026-04-29 10:49:24 +00:00
init LiteralNode with string view, code cleaning
This commit is contained in:
@@ -101,7 +101,7 @@ class LiteralNode : public ExpressionNode {
|
||||
public:
|
||||
const json value;
|
||||
|
||||
explicit LiteralNode(const json& value, size_t pos) : ExpressionNode(pos), value(value) { }
|
||||
explicit LiteralNode(std::string_view data_text, size_t pos) : ExpressionNode(pos), value(json::parse(data_text)) { }
|
||||
|
||||
void accept(NodeVisitor& v) const {
|
||||
v.visit(*this);
|
||||
|
||||
Reference in New Issue
Block a user