cli: Allow arguments to be both strings and json

This commit is contained in:
Ava Chow committed 2025-09-23 12:57:34 -07:00
1 parent ad4a49090d
commit 44a493e150
2 files changed
+24 -12

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ def process_mapping(fname):
if line.startswith('};'):
in_rpcs = False
elif '{' in line and '"' in line:
m = re.search(r'{ *("[^"]*"), *([0-9]+) *, *("[^"]*") *},', line)
m = re.search(r'{ *("[^"]*"), *([0-9]+) *, *("[^"]*") *(, \/\*also_string=\*\/true *)?},', line)
assert m, 'No match to table expression: %s' % line
name = parse_string(m.group(1))
idx = int(m.group(2))