WsParser_VS/libParse/libparse.cpp

22 lines
775 B
C++

#include "libparse.h"
using namespace lib_parse;
CheckException::CheckException(const QString& msg) : msg_store(msg) {}
QString CheckException::message() const { return msg_store; }
Analyzer::Analyzer(const QList<std::shared_ptr<const CheckProvider> >& providers) : check_providers(providers) {}
#include <QTime>
#include <QDebug>
std::shared_ptr<const ast_gen::ElementAccess> Analyzer::validCheckWith(std::shared_ptr<const ast_gen::ElementAccess> root) const {
for (auto& v : check_providers){
QTime time_stamp = QTime::currentTime();
v->validCheck(root);
auto current_stamp = QTime::currentTime();
qDebug() << QString(u8"УÑéÆ÷£º%2 ÏûºÄʱ¼ä£º%1 ms¡£").arg(time_stamp.msecsTo(current_stamp)).arg(v->name());
}
return root;
}