Skip to content

Commit

Permalink
Add an assertion for the assumption that all identifier start charact…
Browse files Browse the repository at this point in the history
…ers are also valid continuation characters, so that we notice it if that ever changes.
  • Loading branch information
scoder committed Aug 24, 2019
1 parent bc1f185 commit 4e02338
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/cython-generate-lexicon.py
Expand Up @@ -81,7 +81,9 @@ def get_continue_characters_as_number():
def get_continue_not_start_as_number():
start = get_start_characters_as_number()
cont = get_continue_characters_as_number()
return sorted(set(cont) - set(start))
assert set(start) <= set(cont), \
"We assume that all identifier start characters are also continuation characters."
return sorted(set(cont).difference(start))


def to_ranges(char_num_list):
Expand Down

0 comments on commit 4e02338

Please sign in to comment.