From 1e9843ec0e39a4588a44f86b79105408a2d7013d Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Wed, 24 May 2023 00:12:36 +0200 Subject: [PATCH] errors: show location before the message --- compiler/errors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/errors.py b/compiler/errors.py index a98a2da..f9b9d84 100644 --- a/compiler/errors.py +++ b/compiler/errors.py @@ -7,7 +7,7 @@ from . import source, lexer class CompilationError(Exception): def __init__(self, location: source.SourceLocation, message: str = "Unknown error"): - super().__init__(f"{message} at {str(location)}") + super().__init__(f"{str(location)}: {message} ") self.location = location