25 lines
876 B
C++
25 lines
876 B
C++
#pragma once
|
|
|
|
#include "ast_basic.h"
|
|
#include "ast_gen.h"
|
|
#include "libsyntax.h"
|
|
#include "libtokens.h"
|
|
#include <tokens_novel.h>
|
|
|
|
namespace example_novel {
|
|
class LIBSYNTAX_EXPORT NovalSyntax {
|
|
public:
|
|
/**
|
|
* @brief 获取novel语法解析树
|
|
* @return
|
|
*/
|
|
static std::shared_ptr<const lib_syntax::ExprRule> getSyntaxTree();
|
|
|
|
// 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:
|
|
// 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);
|
|
};
|
|
|
|
} // namespace example_novel
|