aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2024-07-05 22:30:32 +0200
committer GitHub <noreply@github.com>2024-07-05 22:30:32 +0200
commit4a49007492152037bc1e9636b024cc67700e9dae (patch)
tree457b7fbda6d4470465c05d59b0ca51ed30628640 /src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp
parentdeed8ec0ae23651529a58125012c1b4aab015d02 (diff)
parent3eb78b27505b602c1ccfa952c4cc00f942ccb2b9 (diff)
Merge pull request #50 from OpenVicProject/simplify-string-interning
Fix string interning pointer invalidity for AST
Diffstat (limited to 'src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp')
-rw-r--r--src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp b/src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp
index 71985f3..72ff627 100644
--- a/src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp
+++ b/src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp
@@ -75,7 +75,7 @@ std::string FileAbstractSyntaxTree::make_list_visualizer() const {
dryad::visit_node(
node,
[&](const FlatValue* value) {
- result.append(value->value(this->_symbol_interner));
+ result.append(value->value().c_str());
},
[&](const ListValue* value) {
},
@@ -107,10 +107,10 @@ std::string FileAbstractSyntaxTree::make_native_visualizer() const {
dryad::visit_tree(
this->_tree,
[&](const IdentifierValue* value) {
- result.append(value->value(this->_symbol_interner));
+ result.append(value->value().c_str());
},
[&](const StringValue* value) {
- result.append(1, '"').append(value->value(this->_symbol_interner)).append(1, '"');
+ result.append(1, '"').append(value->value().c_str()).append(1, '"');
},
[&](dryad::child_visitor<NodeKind> visitor, const ValueStatement* statement) {
visitor(statement->value());