cli: Allow arguments to be both strings and json
This commit is contained in:
1 parent
ad4a49090d
commit
44a493e150
2 files changed
+24
-12
No files matched your search
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user