diff --git a/tests/parse/test_error.py b/tests/parse/test_error.py index 96177ec..f6cf264 100644 --- a/tests/parse/test_error.py +++ b/tests/parse/test_error.py @@ -1,6 +1,29 @@ # SPDX-License-Identifier: LGPL-2.1-only # Copyright 2022 Jookia +# Parse error reporting consists of the following data structures: +# +# ParseTasks represent a task such as parsing a file or directive. +# +# ParseContexts represent a step during the parsing process for the purposes of +# error reporting. +# A context contains: +# - A ParseTask specifying the step +# - The Token the task started at (possibly None) +# - A parent ParseContext (possibly None) if this task is a component +# of another task +# +# ParseErrors represent an error encountered during a parsing task, such as an +# unexpected token or invalid token. +# +# ParseErrorExceptions represent an error encounted during parsing. +# An error exception contains: +# - A ParseError detailing the error +# - The Token the error is at (possibly None) +# - An expected string (possibly None), used if the parser is expecting +# a single, specific token such as a keyword +# - A ParseContext detailing the current parsing task + from hypothesis.strategies import composite, integers, sampled_from, text from src.parse import (