2024-03-17 07:58:28 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QFileInfoList>
|
|
|
|
#include <ast_gen.h>
|
|
|
|
#include <libsyntax.h>
|
|
|
|
#include <libparse.h>
|
|
|
|
|
2024-06-20 14:13:06 +00:00
|
|
|
namespace example_novel {
|
|
|
|
class FragmentGraphHelper;
|
|
|
|
}
|
|
|
|
|
2024-03-17 07:58:28 +00:00
|
|
|
class NovelParser
|
|
|
|
{
|
|
|
|
private:
|
2024-07-12 22:47:28 +00:00
|
|
|
std::shared_ptr<ast_gen::GlobalElement> context = nullptr;
|
2025-02-08 05:40:36 +00:00
|
|
|
std::shared_ptr<const ExprRule> syntax_defines;
|
2024-03-17 07:58:28 +00:00
|
|
|
QList<std::shared_ptr<const lib_parse::CheckProvider>> checker_list;
|
|
|
|
std::shared_ptr<const lib_parse::Analyzer> analyzer_ref;
|
|
|
|
|
|
|
|
public:
|
|
|
|
NovelParser();
|
2024-06-20 14:13:06 +00:00
|
|
|
QList<std::shared_ptr<const example_novel::FragmentGraphHelper>> fragmentsSorted() const;
|
2024-03-17 07:58:28 +00:00
|
|
|
|
|
|
|
virtual QString version() const;
|
2025-02-08 05:40:36 +00:00
|
|
|
std::shared_ptr<IContext> parserContext() const;
|
|
|
|
QList<std::shared_ptr<const IExprInstance>> parse(const QFileInfoList souurce_list) const;
|
|
|
|
std::shared_ptr<const ast_gen::ElementAccess> validsApply(QList<std::shared_ptr<const IExprInstance>> docs_list) const;
|
2024-03-17 07:58:28 +00:00
|
|
|
};
|