Skip to content

Commit

Permalink
Prettier error output
Browse files Browse the repository at this point in the history
  • Loading branch information
msaelices committed Sep 14, 2023
1 parent 9e52c69 commit c545625
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py2mojo/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,5 @@ def display_error(node: ast.AST, message: str):
src = astor.to_source(node)

highlighted_src = highlight_code_at_position(src, 1, node.col_offset, node.end_col_offset)
print('[bold red]Error:[/bold red]', message)
print(highlighted_src)
print('\n[bold red]Error:[/bold red]', message)
print('[light_salmon3]Source[/light_salmon3]:\n', highlighted_src)

0 comments on commit c545625

Please sign in to comment.