MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / parse_string_value

Function parse_string_value

tools/cmdline.py:653–660  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

651 # has a newline at the end. For that reason, we rstrip() in relevant
652 # places here.
653 def parse_string_value(text):
654 first = text[0]
655 if first in {"'", '"'}:
656 text = text.rstrip()
657 if text[-1] != text[0] or len(text) < 2:
658 raise ValueError(f'unclosed quoted string. expected final character to be "{text[0]}" and length to be greater than 1 in "{text[0]}"')
659 return text[1:-1]
660 return text
661
662 def parse_string_list_members(text):
663 sep = ','

Callers 1

parse_valueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected