The expression contains invalid syntax. :param column: The column in the line where the error occurred (1-based). :param message: A description of the error.
| 55 | |
| 56 | |
| 57 | class ParseError(Exception): |
| 58 | """The expression contains invalid syntax. |
| 59 | |
| 60 | :param column: The column in the line where the error occurred (1-based). |
| 61 | :param message: A description of the error. |
| 62 | """ |
| 63 | |
| 64 | def __init__(self, column: int, message: str) -> None: |
| 65 | self.column = column |
| 66 | self.message = message |
| 67 | |
| 68 | def __str__(self) -> str: |
| 69 | return f"at column {self.column}: {self.message}" |
| 70 | |
| 71 | |
| 72 | class Scanner: |