aboutsummaryrefslogtreecommitdiff
path: root/lib/python/qmk/c_parse.py
diff options
context:
space:
mode:
authorNick Brassel <[email protected]>2025-02-28 09:23:04 +1100
committerNick Brassel <[email protected]>2025-02-28 09:23:04 +1100
commita63fd7f01cdabd9ce85bb09ae2b573fd3b8e60aa (patch)
tree35d817580e5244d62a150a2d012f72906a610977 /lib/python/qmk/c_parse.py
parent6d0e5728aa61b442885d48caf49d29e5c60e8197 (diff)
parentcdb865cf60b17593f5c811c24a21d7b3030d8653 (diff)
downloadqmk_firmware-a63fd7f01cdabd9ce85bb09ae2b573fd3b8e60aa.tar.gz
qmk_firmware-a63fd7f01cdabd9ce85bb09ae2b573fd3b8e60aa.zip
Merge remote-tracking branch 'upstream/develop'0.28.0
Diffstat (limited to 'lib/python/qmk/c_parse.py')
-rw-r--r--lib/python/qmk/c_parse.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/qmk/c_parse.py b/lib/python/qmk/c_parse.py
index 08d23cf5ba..785b940456 100644
--- a/lib/python/qmk/c_parse.py
+++ b/lib/python/qmk/c_parse.py
@@ -24,7 +24,7 @@ def _get_chunks(it, size):
return iter(lambda: tuple(islice(it, size)), ())
-def _preprocess_c_file(file):
+def preprocess_c_file(file):
"""Load file and strip comments
"""
file_contents = file.read_text(encoding='utf-8')
@@ -66,7 +66,7 @@ def find_layouts(file):
parsed_layouts = {}
# Search the file for LAYOUT macros and aliases
- file_contents = _preprocess_c_file(file)
+ file_contents = preprocess_c_file(file)
for line in file_contents.split('\n'):
if layout_macro_define_regex.match(line.lstrip()) and '(' in line and 'LAYOUT' in line:
@@ -248,7 +248,7 @@ def _parse_led_config(file, matrix_cols, matrix_rows):
current_row_index = 0
current_row = []
- for _type, value in lex(_preprocess_c_file(file), CLexer()):
+ for _type, value in lex(preprocess_c_file(file), CLexer()):
if not found_g_led_config:
# Check for type
if value == 'led_config_t':