summaryrefslogtreecommitdiff
path: root/source/compiler-core/slang-json-value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler-core/slang-json-value.cpp')
-rw-r--r--source/compiler-core/slang-json-value.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/compiler-core/slang-json-value.cpp b/source/compiler-core/slang-json-value.cpp
index 5b1ee0047..9a2bb37f4 100644
--- a/source/compiler-core/slang-json-value.cpp
+++ b/source/compiler-core/slang-json-value.cpp
@@ -137,6 +137,17 @@ JSONContainer::JSONContainer(SourceManager* sourceManager):
_addRange(Range::Type::None, 0, 0);
}
+void JSONContainer::reset()
+{
+ m_slicePool.clear();
+
+ m_freeRangeIndices.clear();
+ m_arrayValues.clear();
+ m_objectValues.clear();
+
+ _addRange(Range::Type::None, 0, 0);
+}
+
/* static */bool JSONContainer::areKeysUnique(const JSONKeyValue* keyValues, Index keyValueCount)
{
for (Index i = 1; i < keyValueCount; ++i)