1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#include "stdinjsonrpcparser.h"
6#include "common/lsp/protocol/new/jsonrpcparser.h"
7
8#include <QTextStream>
9#include <QDebug>
10#include <QRegularExpression>
11#include <QCoreApplication>
12#include <QJsonObject>
13#include <QJsonDocument>
14
15#include <iostream>
16
17namespace newlsp {
18
19StdinJsonRpcParser::StdinJsonRpcParser()
20 : StdinReadLoop ()
21 , d(new JsonRpcParser())
22{
23 QObject::connect(this, &StdinReadLoop::readedLine,
24 d, &JsonRpcParser::doParseReadLine,
25 Qt::DirectConnection);
26 QObject::connect(d, &JsonRpcParser::readedJsonObject,
27 this, &StdinJsonRpcParser::readedJsonObject,
28 Qt::DirectConnection);
29}
30
31StdinJsonRpcParser::~StdinJsonRpcParser()
32{
33 if (d) {
34 delete d;
35 }
36}
37
38} // newlsp
39