[mlir:PDLL] Fix error handling of eof within a string literal
authorRiver Riddle <riddleriver@gmail.com>
Tue, 26 Apr 2022 20:27:03 +0000 (13:27 -0700)
committerRiver Riddle <riddleriver@gmail.com>
Thu, 28 Apr 2022 19:58:00 +0000 (12:58 -0700)
commitebb1e900d3b3edcac0e96f23cd15509f1fbe77d9
tree746982ce1f733088f3f23dba9f87852c895d2bae
parent32bf1f1d57e7fdc240ee6e703306c57b0fa16c8e
[mlir:PDLL] Fix error handling of eof within a string literal

We currently aren't handling this properly, and in the case
of a string block just crash. This commit adds proper error handling
and detection for eof.

Differential Revision: https://reviews.llvm.org/D124585
mlir/lib/Tools/PDLL/Parser/Lexer.cpp
mlir/lib/Tools/PDLL/Parser/Parser.cpp
mlir/test/mlir-pdll/Parser/string-eof.pdll [new file with mode: 0644]