diff options
author | QMK Bot <[email protected]> | 2023-06-08 20:08:49 +0000 |
---|---|---|
committer | QMK Bot <[email protected]> | 2023-06-08 20:08:49 +0000 |
commit | 760a976993d6e4b72a5dc6fecd72e638c189a835 (patch) | |
tree | 5be52bdebbc9bf20e87589bdafcb6e664398ddab | |
parent | f861695e83ef3b5ed8e1ed0c03741e213d14154c (diff) | |
parent | a9f677b5186f1b998dd987a4a1a2ae79eb3cf72e (diff) | |
download | qmk_firmware-760a976993d6e4b72a5dc6fecd72e638c189a835.tar.gz qmk_firmware-760a976993d6e4b72a5dc6fecd72e638c189a835.zip |
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r-- | lib/python/qmk/c_parse.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/python/qmk/c_parse.py b/lib/python/qmk/c_parse.py index 7dd464bd34..08d23cf5ba 100644 --- a/lib/python/qmk/c_parse.py +++ b/lib/python/qmk/c_parse.py @@ -241,19 +241,24 @@ def _parse_led_config(file, matrix_cols, matrix_rows): position_raw = [] flags = [] - found_led_config = False + found_led_config_t = False + found_g_led_config = False bracket_count = 0 section = 0 current_row_index = 0 current_row = [] for _type, value in lex(_preprocess_c_file(file), CLexer()): - # Assume g_led_config..stuff..; - if value == 'g_led_config': - found_led_config = True + if not found_g_led_config: + # Check for type + if value == 'led_config_t': + found_led_config_t = True + # Type found, now check for name + elif found_led_config_t and value == 'g_led_config': + found_g_led_config = True elif value == ';': - found_led_config = False - elif found_led_config: + found_g_led_config = False + else: # Assume bracket count hints to section of config we are within if value == '{': bracket_count += 1 |