31 lines
922 B
C++
31 lines
922 B
C++
#pragma once
|
|
|
|
#include <QFileInfoList>
|
|
#include <ast_gen.h>
|
|
#include <libsyntax.h>
|
|
#include <libparse.h>
|
|
|
|
namespace example_novel {
|
|
class PointGraphHelper;
|
|
class NGlobalElement;
|
|
}
|
|
|
|
/**
|
|
* @brief 集成编译器.
|
|
*/
|
|
class NovelParser
|
|
{
|
|
private:
|
|
std::shared_ptr<example_novel::NGlobalElement> context = nullptr;
|
|
QList<std::shared_ptr<const lib_parse::CheckProvider>> checker_list;
|
|
std::shared_ptr<const lib_parse::Analyzer> analyzer_ref;
|
|
|
|
public:
|
|
NovelParser();
|
|
QList<std::shared_ptr<const example_novel::PointGraphHelper>> fragmentsSorted() const;
|
|
|
|
virtual QString version() const;
|
|
std::shared_ptr<example_novel::NGlobalElement> parserContext() const;
|
|
std::shared_ptr<const example_novel::NGlobalElement> parse(const QFileInfoList souurce_list) const;
|
|
std::shared_ptr<const ast_gen::ElementAccess> validsApply(std::shared_ptr<const example_novel::NGlobalElement> root) const;
|
|
}; |