Branch: refs/heads/main
Revision: 6dfe007
Author: dlongnecke-cray
Link: Unavailable
Log Message:
Merge pull request #19231 from dlongnecke-cray/dyno-error-reporting
dyno: Add verbosity to ErrorMessage and add more detailed parse errors
Add a Kind
to the ErrorMessage
class which can be used to
specify the verbosity level of the error. The current values are
NOTE
, WARNING
, SYNTAX
, and ERROR
.
Rename Context::error(ErrorMessage)
to Context::report()
. The
Context::error()
overloads now create ErrorMessage
with a
verbosity level of ERROR
.
The intention is to add more methods to the Context
such as
warning
or fatal
which allow users to specify errors of different
verbosity levels.
Adjust the yychpl_error
hook used by Bison to print out the current
token if it is available. This is similar to what is done in the
old parser. This hook now makes errors with verbosity level SYNTAX
.
Add helpers to note warnings to the ParserContext
.
Implement ++
and --
in the grammar and have their handlers
note warnings.
TESTING
- [x] Down to
732
failures with--compiler-library-parser
(Note that you will not see this count without rebuilding
thedyno
parser)
Reviewed by @mppf. Thanks!
Signed-off-by: David Longnecker dlongnecke-cray@users.noreply.github.com
Modified Files:
M compiler/include/misc.h
M compiler/next/include/chpl/queries/Context.h
M compiler/next/include/chpl/queries/ErrorMessage.h
M compiler/next/lib/parsing/Parser.cpp
M compiler/next/lib/parsing/ParserContext.h
M compiler/next/lib/parsing/ParserContextImpl.h
M compiler/next/lib/parsing/chpl.ypp
M compiler/next/lib/parsing/parser-dependencies.h
M compiler/next/lib/parsing/parser-help.h
M compiler/next/lib/parsing/parsing-queries.cpp
M compiler/next/lib/queries/Context.cpp
M compiler/next/lib/queries/ErrorMessage.cpp
M compiler/next/lib/resolution/resolution-queries.cpp
M compiler/next/lib/util/filesystem.cpp
M compiler/parser/parser.cpp
Compare: https://github.com/chapel-lang/chapel/compare/2130cf548730...6dfe0070587c