diff --git a/src/parse.py b/src/parse.py index 39af39f..2cf8689 100644 --- a/src/parse.py +++ b/src/parse.py @@ -336,8 +336,8 @@ offset = exception.token.location.offset args = args + [line, offset] ids = [ - ["ParseError", "ParseErrorAt"], - ["ParseErrorExpected", "ParseErrorExpectedAt"], + ["ParserError", "ParserErrorAt"], + ["ParserErrorExpected", "ParserErrorExpectedAt"], ] id = ids[has_expected][has_token] return Message(id, args) diff --git a/tests/parse/test_error.py b/tests/parse/test_error.py index a0e7585..ff487c0 100644 --- a/tests/parse/test_error.py +++ b/tests/parse/test_error.py @@ -159,10 +159,10 @@ # "At" and the second and third parameters are the token's # location's line and offset # Four combinations are possible: -# - Message("ParseError", [error]) -# - Message("ParseErrorAt", [error, line, offset]) -# - Message("ParseErrorExpected", [expected]) -# - Message("ParseErrorExpectedAt", [expected, line, offset]) +# - Message("ParserError", [error]) +# - Message("ParserErrorAt", [error, line, offset]) +# - Message("ParserErrorExpected", [expected]) +# - Message("ParserErrorExpectedAt", [expected, line, offset]) @given(draw_parse_error_exception()) def test_parse_error_format_exception(exception): has_expected = exception.expected is not None @@ -181,13 +181,13 @@ messages = [ # Cases without an expected token: [ - Message("ParseError", [err]), - Message("ParseErrorAt", [err, line, offset]), + Message("ParserError", [err]), + Message("ParserErrorAt", [err, line, offset]), ], # Cases with an expected token: [ - Message("ParseErrorExpected", [expect]), - Message("ParseErrorExpectedAt", [expect, line, offset]), + Message("ParserErrorExpected", [expect]), + Message("ParserErrorExpectedAt", [expect, line, offset]), ], ] expected = messages[has_expected][has_location]