mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-17 07:19:42 +00:00
tool/btstack_parser: fix camel case output
This commit is contained in:
parent
2530362585
commit
9c80623268
@ -103,7 +103,7 @@ def parse_events():
|
|||||||
|
|
||||||
return (events, subvents, event_types)
|
return (events, subvents, event_types)
|
||||||
|
|
||||||
def my_parse_commands(infile, camel_case):
|
def my_parse_commands(infile, convert_to_camel_case):
|
||||||
commands = []
|
commands = []
|
||||||
with open (infile, 'rt') as fin:
|
with open (infile, 'rt') as fin:
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ def my_parse_commands(infile, camel_case):
|
|||||||
parts = re.match('.*@param\s*(\w*)\s*', line)
|
parts = re.match('.*@param\s*(\w*)\s*', line)
|
||||||
if parts and len(parts.groups()) == 1:
|
if parts and len(parts.groups()) == 1:
|
||||||
param = parts.groups()[0]
|
param = parts.groups()[0]
|
||||||
if camel_case:
|
if convert_to_camel_case:
|
||||||
param = camel_case_var(param)
|
param = camel_case_var(param)
|
||||||
else:
|
else:
|
||||||
param = param.lower()
|
param = param.lower()
|
||||||
@ -126,7 +126,7 @@ def my_parse_commands(infile, camel_case):
|
|||||||
# drop _cmd suffix for daemon commands
|
# drop _cmd suffix for daemon commands
|
||||||
if command_name.endswith('_cmd'):
|
if command_name.endswith('_cmd'):
|
||||||
command_name = command_name[:-len('_cmd')]
|
command_name = command_name[:-len('_cmd')]
|
||||||
if camel_case:
|
if convert_to_camel_case:
|
||||||
command_name = camel_case(command_name)
|
command_name = camel_case(command_name)
|
||||||
else:
|
else:
|
||||||
command_name = command_name.lower()
|
command_name = command_name.lower()
|
||||||
|
Loading…
Reference in New Issue
Block a user