WsParser_VS/libSyntax/syntax_novel.h

40 lines
1.1 KiB
C
Raw Normal View History

2024-03-17 07:58:28 +00:00
#pragma once
#include "ast_basic.h"
#include "ast_gen.h"
2024-03-17 07:58:28 +00:00
#include "libsyntax.h"
#include <libtoken.h>
#include <tokens_novel.h>
namespace example_novel {
/**
* @brief <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* ExprNode::typeMark() <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
*/
enum NovelExprs {
DESPITE = -1,
DESC_SECTION = 0,
FRAG_REFERS = 1,
FRAG_DEFINES = 2,
STORY_DEFINES = 3,
DOC_DEFINES = 4,
VOLUME_DEFINE = 5,
ARTICLE_DEFINE = 6,
};
class LIBSYNTAX_EXPORT NovalSyntax {
public:
/**
* @brief <EFBFBD><EFBFBD>ȡnovel<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return
*/
static std::shared_ptr<const lib_syntax::ExprRule> getParseTree();
static std::shared_ptr<const ast_gen::SyntaxElement> tidy(std::shared_ptr<ast_gen::SyntaxElement> root, QList<std::shared_ptr<ast_gen::SyntaxElement>> docs);
private:
2024-07-28 08:37:31 +00:00
static void build_objecttree(std::shared_ptr<ast_gen::SyntaxElement> root, QList<std::shared_ptr<ast_gen::SyntaxElement>> docs);
static void node_register(std::shared_ptr<const ast_gen::SyntaxElement> root, QList<std::shared_ptr<ast_gen::SyntaxElement>> docs);
2024-03-17 07:58:28 +00:00
};
} // namespace example_novel