Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions spylls/hunspell/readers/aff.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,15 @@ def _read_array(count=None):
]
if directive in ['SFX', 'PFX']:
flag, crossproduct, count, *_ = values
return [
make_affix(directive, flag, crossproduct, *line, context=context)
for line in _read_array(int(count))
]
try:
return [
make_affix(directive, flag, crossproduct, *line, context=context)
for line in _read_array(int(count))
]
except ValueError as error:
print(f"Error at: directive, values: {directive}, {values}")
print(f"Maybe wrong count of rules?")
raise error
if directive == 'CHECKCOMPOUNDPATTERN':
return [
aff.CompoundPattern(left, right, rest[0] if rest else None)
Expand Down