Skip to content

Commit

Permalink
Add tokenizer error prefaces to stub typechecker to match __main__
Browse files Browse the repository at this point in the history
  • Loading branch information
jmanuel1 committed Nov 6, 2024
1 parent 3998da7 commit a8edcc0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions concat/typecheck/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,12 +670,14 @@ def _check_stub_resolved_path(
if r.type == 'token':
tokens.append(r.token)
elif r.type == 'indent-err':
print('Indentation error:')
print(
create_indentation_error_message(
f, (r.err.lineno or 1, r.err.offset or 0), r.err.msg
)
)
elif r.type == 'token-err':
print('Lexical error:')
print(create_lexical_error_message(f, r.location, str(r.err)))
else:
assert_never(r)
Expand Down

0 comments on commit a8edcc0

Please sign in to comment.