[Mlir-commits] [mlir] [mlir-lsp] Abstract input and output of the `JSONTransport` (PR #129320)
Nikolay Panchenko
llvmlistbot at llvm.org
Fri Feb 28 14:22:42 PST 2025
================
@@ -43,14 +43,86 @@ enum JSONStreamStyle {
Delimited
};
+/// An abstract class used by the JSONTransport to read JSON message.
+class JSONTransportInput {
+public:
+ explicit JSONTransportInput(JSONStreamStyle style = JSONStreamStyle::Standard)
+ : style(style) {}
+ virtual ~JSONTransportInput() = default;
+
+ virtual bool getError() const = 0;
----------------
npanchen wrote:
you're right, I wanted to return error first, but it won't be easy if error type is different for custom implementation.
https://github.com/llvm/llvm-project/pull/129320
More information about the Mlir-commits
mailing list