INNER CODE UNIT · Python
value
christopherkarani/Wax · Resources/hermes/wax-memory-plugin/cli.py:63
value = value[1:-1]
parts: list[str] = []
start = 0
depth = 0
quote = ""
for index, character in enumerate(value):
if character in {"'", '"'}:
if not quote:
quote = character
elif quote == character:
quote = ""
elif not quote:
if character in "{[":
depth += 1
elif character in "}]":
depth -= 1
elif character == "," and depth == 0:
parts.append(value[start:index].strip())