aboutsummaryrefslogtreecommitdiff
path: root/lib/python/qmk/c_parse.py
diff options
context:
space:
mode:
authorZach White <skullydazed@gmail.com>2021-01-08 00:00:15 -0800
committerZach White <skullydazed@drpepper.org>2021-01-08 08:40:23 -0800
commit30331b383f9ef4620e47aa07e4f9af7fae9d30b3 (patch)
tree4d1a12b52d99aa3c31f6a859c9a71959159d58de /lib/python/qmk/c_parse.py
parenta828a82d59b6205a56f7d42d51217f13ffbcb0d5 (diff)
downloadqmk_firmware-30331b383f9ef4620e47aa07e4f9af7fae9d30b3.tar.gz
qmk_firmware-30331b383f9ef4620e47aa07e4f9af7fae9d30b3.zip
fix bugs triggered by certain boards
Diffstat (limited to 'lib/python/qmk/c_parse.py')
-rw-r--r--lib/python/qmk/c_parse.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/python/qmk/c_parse.py b/lib/python/qmk/c_parse.py
index 67e196f0e..0338484ec 100644
--- a/lib/python/qmk/c_parse.py
+++ b/lib/python/qmk/c_parse.py
@@ -9,7 +9,7 @@ from qmk.comment_remover import comment_remover
9 9
10default_key_entry = {'x': -1, 'y': 0, 'w': 1} 10default_key_entry = {'x': -1, 'y': 0, 'w': 1}
11single_comment_regex = re.compile(r' */[/*].*$') 11single_comment_regex = re.compile(r' */[/*].*$')
12multi_comment_regex = re.compile(r'/\*(.|\n)*\*/', re.MULTILINE) 12multi_comment_regex = re.compile(r'/\*(.|\n)*?\*/', re.MULTILINE)
13 13
14 14
15def strip_line_comment(string): 15def strip_line_comment(string):
@@ -103,7 +103,7 @@ def parse_config_h_file(config_h_file, config_h=None):
103 103
104 if config_h_file.exists(): 104 if config_h_file.exists():
105 config_h_text = config_h_file.read_text() 105 config_h_text = config_h_file.read_text()
106 config_h_text = config_h_text.replace('\\\n', '') 106 config_h_text = config_h_text.replace('\\\n', '') # Why are you here?
107 config_h_text = strip_multiline_comment(config_h_text) 107 config_h_text = strip_multiline_comment(config_h_text)
108 108
109 for linenum, line in enumerate(config_h_text.split('\n')): 109 for linenum, line in enumerate(config_h_text.split('\n')):