Skip to content

Commit 4e02338

Browse files
committed
Add an assertion for the assumption that all identifier start characters are also valid continuation characters, so that we notice it if that ever changes.
1 parent bc1f185 commit 4e02338

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/cython-generate-lexicon.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ def get_continue_characters_as_number():
8181
def get_continue_not_start_as_number():
8282
start = get_start_characters_as_number()
8383
cont = get_continue_characters_as_number()
84-
return sorted(set(cont) - set(start))
84+
assert set(start) <= set(cont), \
85+
"We assume that all identifier start characters are also continuation characters."
86+
return sorted(set(cont).difference(start))
8587

8688

8789
def to_ranges(char_num_list):

0 commit comments

Comments
 (0)