From a97ed72b677ef31802f3b3edfcadf07c111b9d8e Mon Sep 17 00:00:00 2001 From: codeboss <2422523675@qq.com> Date: Sat, 22 Jun 2024 18:53:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=90=AF=E5=8A=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E8=A7=A3=E6=9E=90=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ArgsParser/ArgsParser.vcxproj | 107 ++++++++++++++++++ ArgsParser/ArgsParser.vcxproj.filters | 36 ++++++ ArgsParser/ArgsParser.vcxproj.user | 12 ++ ArgsParser/argsparser.cpp | 135 ++++++++++++++++++++++ ArgsParser/argsparser.h | 124 ++++++++++++++++++++ ArgsParser/argsparser_global.h | 13 +++ WsNovelParser.sln | 6 + WsNovelParser/WsNovelParser.vcxproj | 4 +- WsNovelParser/WsNovelParser.vcxproj.user | 2 +- WsNovelParser/main.cpp | 137 ++++++++++++----------- libSyntax/ast_gen.cpp | 4 +- libSyntax/ast_gen.h | 2 +- libToken/tokens_novel.cpp | 8 +- libToken/tokens_novel.h | 4 +- 14 files changed, 517 insertions(+), 77 deletions(-) create mode 100644 ArgsParser/ArgsParser.vcxproj create mode 100644 ArgsParser/ArgsParser.vcxproj.filters create mode 100644 ArgsParser/ArgsParser.vcxproj.user create mode 100644 ArgsParser/argsparser.cpp create mode 100644 ArgsParser/argsparser.h create mode 100644 ArgsParser/argsparser_global.h diff --git a/ArgsParser/ArgsParser.vcxproj b/ArgsParser/ArgsParser.vcxproj new file mode 100644 index 0000000..4fe94b0 --- /dev/null +++ b/ArgsParser/ArgsParser.vcxproj @@ -0,0 +1,107 @@ + + + + + Debug + x64 + + + Release + x64 + + + + {1FF80476-26C9-42FB-BFF6-D587C4941964} + QtVS_v304 + 10.0 + 10.0 + $(MSBuildProjectDirectory)\QtMsBuild + + + + DynamicLibrary + v143 + true + Unicode + + + DynamicLibrary + v143 + false + true + Unicode + + + + + + + 5.12.11_msvc2017_64 + core + debug + + + 5.12.11_msvc2017_64 + core + release + + + + + + + + + + + + + + + + + + + + + + true + ARGSPARSER_LIB;%(PreprocessorDefinitions) + Level3 + true + true + + + Windows + true + + + + + true + ARGSPARSER_LIB;%(PreprocessorDefinitions) + Level3 + true + true + true + true + + + Windows + false + true + true + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ArgsParser/ArgsParser.vcxproj.filters b/ArgsParser/ArgsParser.vcxproj.filters new file mode 100644 index 0000000..0e74a59 --- /dev/null +++ b/ArgsParser/ArgsParser.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + qml;cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {99349809-55BA-4b9d-BF79-8FDBB0286EB3} + ui + + + {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C} + ts + + + + + Header Files + + + Source Files + + + Header Files + + + \ No newline at end of file diff --git a/ArgsParser/ArgsParser.vcxproj.user b/ArgsParser/ArgsParser.vcxproj.user new file mode 100644 index 0000000..41a709a --- /dev/null +++ b/ArgsParser/ArgsParser.vcxproj.user @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/ArgsParser/argsparser.cpp b/ArgsParser/argsparser.cpp new file mode 100644 index 0000000..5d0102a --- /dev/null +++ b/ArgsParser/argsparser.cpp @@ -0,0 +1,135 @@ +#include "argsparser.h" + +using namespace args_parse; + +ArgvPackImpl::ArgvPackImpl(const QString& means, ParamType t) : means_store(means), type_store(t) {} + +// ͨ ArgvPack ̳ +ParamType ArgvPackImpl::paramType() const { return type_store; } + +QString ArgvPackImpl::means() const { return means_store; } + +void ArgvPackImpl::setValue(const QString& v) { + this->value_store = v; +} + +QString ArgvPackImpl::value() const { return value_store; } + +FloatArgvPack::FloatArgvPack(const QString& key, const QString& means, bool optional) : + FloatArgvImpl(key, means, optional) {} + +QString FloatArgvImpl::bindKey() const { return key_name; } + +bool FloatArgvImpl::optional() const { + return optional_value; +} + +int FloatArgvPack::matchLenth() const +{ + return 2; +} + +bool FloatArgvPack::parse(const QList args, int start) +{ + auto args_t = args[start]; + auto args_v = args[start + 1]; + if(args_t == bindKey()) + setValue(args_v); + return args_t == bindKey(); +} + +IndexParam::IndexParam(const QString& means) : ArgvPackImpl(means, ParamType::IndexParam) {} + +int args_parse::IndexParam::matchLenth() const +{ + return 1; +} + +bool args_parse::IndexParam::parse(const QList args, int start) +{ + setValue(args[start]); + return true; +} + +FloatArgvImpl::FloatArgvImpl(const QString& key, const QString& means, bool optional) + : ArgvPackImpl(means, ParamType::FloatParam), key_name(key), optional_value(optional) {} + +FloatOption::FloatOption(const QString &key, const QString &means, bool opt) + : FloatArgvImpl(key, means, opt) { setValue(u8"0"); } + +int FloatOption::matchLenth() const { return 1; } + +bool FloatOption::parse(const QList args, int start) { + auto args_t = args[start]; + setValue(QString::number(args_t == bindKey())); + return args_t == bindKey(); +} + +namespace args_parse { + class MatchMode { + private: + QList> args_mode; + int code_store; + + public: + explicit MatchMode(const QList> mode, int mode_code) :args_mode(mode), code_store(mode_code) {} + + int modeCode()const {return code_store;} + QList> result() const {return args_mode;} + bool parse(const QList& args, int argv_start, int parse_index) { + if(argv_start >= args.size()) + return true; + + auto parse_unit = args_mode[parse_index]; + + switch (parse_unit->paramType()) { + case ParamType::IndexParam: { + parse_unit->parse(args, argv_start); + return parse(args, argv_start + parse_unit->matchLenth(), parse_index + 1); + }break; + case ParamType::FloatParam: { + QList> float_parsers; + + for (auto& unit : args_mode) { + if (unit->paramType() == ParamType::FloatParam) + float_parsers.append(std::dynamic_pointer_cast(unit)); + } + + for (auto& unit : float_parsers) { + if(unit->matchLenth() + argv_start > args.size()) + continue; + + auto result = unit->parse(args, argv_start); + if (result) + if (parse(args, argv_start + unit->matchLenth(), parse_index + 1)) + return true; + else if (!result && unit->optional()) + if (parse(args, argv_start, parse_index + 1)) + return true; + } + }break; + } + + return false; + } + }; +} +void args_parse::ArgsParser::loadMode(int mode_code, const QList>& args_model) +{ + this->match_modes.append(std::make_shared(args_model, mode_code)); +} + +std::tuple>> args_parse::ArgsParser::parse(int argc, char* argv[]){ + QList args_list; + for (int idx = 0; idx < argc; idx++) { + auto argv_str = QString::fromLocal8Bit(argv[idx]); + args_list.append(argv_str); + } + + for (auto& minst : this->match_modes) { + if (minst->parse(args_list, 0, 0)) + return std::tuple>>(minst->modeCode(), minst->result()); + } + + return std::tuple>>(0, QList>()); +} diff --git a/ArgsParser/argsparser.h b/ArgsParser/argsparser.h new file mode 100644 index 0000000..9fd4589 --- /dev/null +++ b/ArgsParser/argsparser.h @@ -0,0 +1,124 @@ +#pragma once + +#include +#include +#include +#include +#include +#include "argsparser_global.h" + +namespace args_parse { + /** + * . + */ + enum class ParamType { + IndexParam, + FloatParam, + }; + + /** + * @brief в. + */ + class ArgvPack { + public: + virtual ~ArgvPack() = default; + + virtual ParamType paramType() const = 0; + virtual QString means() const = 0; + virtual QString value() const = 0; + /** + * @brief ƥ䳤. + * + * \return + */ + virtual int matchLenth() const = 0; + /** + * @brief . + * + * \param argv + * \param start ʼ + * \return ƥɹ + */ + virtual bool parse(const QList args, int start) = 0; + }; + + class ARGSPARSER_EXPORT ArgvPackImpl : public ArgvPack { + private: + QString means_store; + QString value_store; + ParamType type_store; + + public: + ArgvPackImpl(const QString &means, ParamType t); + + void setValue(const QString &v); + + // ͨ ArgvPack ̳ + ParamType paramType() const override; + QString means() const override; + QString value() const override; + }; + + class ARGSPARSER_EXPORT FloatArgvImpl : public ArgvPackImpl { + private: + QString key_name; + bool optional_value; + + public: + explicit FloatArgvImpl(const QString& key, const QString& means, bool optional); + + QString bindKey() const; + virtual bool optional() const; + }; + + /** + * @brief key-valueƥģʽ. + * --key value + */ + class ARGSPARSER_EXPORT FloatArgvPack : public FloatArgvImpl { + public: + explicit FloatArgvPack(const QString& key, const QString &means, bool optional = false); + virtual ~FloatArgvPack() = default; + + virtual int matchLenth() const override; + bool parse(const QList args, int start) override; + }; + + /** + * @brief keyƥģʽ. + * --key + */ + class ARGSPARSER_EXPORT FloatOption : public FloatArgvImpl { + public: + explicit FloatOption(const QString& key, const QString& means, bool optional = false); + virtual ~FloatOption() = default; + + virtual int matchLenth() const override; + bool parse(const QList args, int start) override; + }; + + /** + * . + */ + class ARGSPARSER_EXPORT IndexParam : public ArgvPackImpl { + public: + explicit IndexParam(const QString &means); + virtual ~IndexParam() = default; + + // ͨ ArgvPackImpl ̳ + int matchLenth() const override; + bool parse(const QList args, int start) override; + }; + + class MatchMode; + class ARGSPARSER_EXPORT ArgsParser { + private: + QList> match_modes; + + public: + void loadMode(int mode_code, const QList> &args_model); + + std::tuple>> parse(int argc, char* argv[]); + }; + +} \ No newline at end of file diff --git a/ArgsParser/argsparser_global.h b/ArgsParser/argsparser_global.h new file mode 100644 index 0000000..dd265a4 --- /dev/null +++ b/ArgsParser/argsparser_global.h @@ -0,0 +1,13 @@ +#pragma once + +#include + +#ifndef BUILD_STATIC +# if defined(ARGSPARSER_LIB) +# define ARGSPARSER_EXPORT Q_DECL_EXPORT +# else +# define ARGSPARSER_EXPORT Q_DECL_IMPORT +# endif +#else +# define ARGSPARSER_EXPORT +#endif diff --git a/WsNovelParser.sln b/WsNovelParser.sln index 8cc136e..09f34ac 100644 --- a/WsNovelParser.sln +++ b/WsNovelParser.sln @@ -26,6 +26,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决 报告20240619-1206.diagsession = 报告20240619-1206.diagsession EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArgsParser", "ArgsParser\ArgsParser.vcxproj", "{1FF80476-26C9-42FB-BFF6-D587C4941964}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -48,6 +50,10 @@ Global {C3AADEB5-3695-4DF4-B8E1-D37F928F3B2F}.Debug|x64.Build.0 = Debug|x64 {C3AADEB5-3695-4DF4-B8E1-D37F928F3B2F}.Release|x64.ActiveCfg = Release|x64 {C3AADEB5-3695-4DF4-B8E1-D37F928F3B2F}.Release|x64.Build.0 = Release|x64 + {1FF80476-26C9-42FB-BFF6-D587C4941964}.Debug|x64.ActiveCfg = Debug|x64 + {1FF80476-26C9-42FB-BFF6-D587C4941964}.Debug|x64.Build.0 = Debug|x64 + {1FF80476-26C9-42FB-BFF6-D587C4941964}.Release|x64.ActiveCfg = Release|x64 + {1FF80476-26C9-42FB-BFF6-D587C4941964}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/WsNovelParser/WsNovelParser.vcxproj b/WsNovelParser/WsNovelParser.vcxproj index e3c07d6..edd5651 100644 --- a/WsNovelParser/WsNovelParser.vcxproj +++ b/WsNovelParser/WsNovelParser.vcxproj @@ -61,7 +61,7 @@ - $(SolutionDir)libToken;$(SolutionDir)libSyntax;$(SolutionDir)libParse;$(IncludePath) + $(SolutionDir)libToken;$(SolutionDir)libSyntax;$(SolutionDir)ArgsParser;$(SolutionDir)libParse;$(IncludePath) $(SolutionDir)$(Platform)\$(Configuration)\;$(LibraryPath) nsc @@ -72,7 +72,7 @@ - libToken.lib;libSyntax.lib;libParse.lib;%(AdditionalDependencies) + libToken.lib;libSyntax.lib;libParse.lib;ArgsParser.lib;%(AdditionalDependencies) Default diff --git a/WsNovelParser/WsNovelParser.vcxproj.user b/WsNovelParser/WsNovelParser.vcxproj.user index fe96f15..7526613 100644 --- a/WsNovelParser/WsNovelParser.vcxproj.user +++ b/WsNovelParser/WsNovelParser.vcxproj.user @@ -3,7 +3,7 @@ $(SolutionDir)$(Platform)\$(Configuration)\ WindowsLocalDebugger - --path "D:\手作小说\科学+修仙+创造世界" + --path "D:\手作小说\科学+修仙+创造世界" --html --dest E:\ --path "D:\手作小说\科学+修仙+创造世界" diff --git a/WsNovelParser/main.cpp b/WsNovelParser/main.cpp index 572d187..30c54e2 100644 --- a/WsNovelParser/main.cpp +++ b/WsNovelParser/main.cpp @@ -11,84 +11,93 @@ #include #include #include +#include #include "novelparser.h" #include "htmlprint.h" using namespace example_novel; -std::function, int)> tnode_print = -[&](std::shared_ptr node, int intend) { - auto name = node->element()->signature(); - auto text = QString(intend * 2, ' ') + name; - /*for (auto& t : node->tokens()) { - text += " " + t->token()->content(); - }*/ - qDebug() << text; - - for (auto& c_n : node->children()) { - tnode_print(c_n, intend + 1); - } -}; /* * nsc --help -* nsc [opts] --path path-to-dir +* nsc -[pw] --path path-to-dir [--out path-to-dir] * opts: -* -p print-struct ṹ +* p print-struct ṹ +* w print-web webҳʽ */ int main(int argc, char* argv[]) { QCoreApplication a(argc, argv); - QStringList args; - for (int idx = 0; idx < argc; idx++) { - args += QString::fromLocal8Bit(argv[idx]); - } + args_parse::ArgsParser args_parser; + QList> args_mode; + args_mode << std::make_shared(u8""); + args_mode << std::make_shared(u8"--help", u8""); + args_parser.loadMode(0x000Au, args_mode); - // ÷ - if (args.contains(u8"--help")) { + args_mode.clear(); + args_mode << std::make_shared(u8""); + args_mode << std::make_shared(u8"--path", u8"ԴĿ¼"); + args_mode << std::make_shared(u8"--dest", u8"Ŀ¼", true); + args_mode << std::make_shared(u8"--html", u8"htmlļʽȡAST", true); + args_parser.loadMode(0x000Bu, args_mode); + + + auto parse_result = args_parser.parse(argc, argv); + switch (std::get<0>(parse_result)) + { + case 0xAu: { std::cout << "nsc(WsNovelStoryCompiler߱)" << std::endl; std::cout << "汾V1.0.0" << std::endl; - std::cout << "nsc -path path-to-dir" << std::endl; - exit(0); - } + std::cout << "nsc --path path-to-dir [--dest path-to-output] [--html]" << std::endl; + }break; + case 0xBu: { + auto args = std::get<1>(parse_result); + auto src_dir = std::dynamic_pointer_cast(args_mode[1]); + auto dst_dir = std::dynamic_pointer_cast(args_mode[2]); + auto fmt_opt = std::dynamic_pointer_cast(args_mode[3]); - auto source_dir = QDir::current(); - auto index = args.indexOf(u8"--path"); - if (index < 0) { - std::cout << "󣺱ָ --path " << endl; - exit(1); - } - if (index + 1 >= args.size()) { - std::cout << "--path Ӧstoryļĸļ·" << std::endl; - exit(1); - } - else { - auto tdir = QDir(args[index+1]); - if (tdir.exists()) { - source_dir = tdir; + auto source_dir = QDir(src_dir->value()); + if (!source_dir.exists()) { + std::cout << "ָԴĿ¼ڣ" << std::endl; + exit(0); } - else { - std::cout << "󣺴storyļļ·Ч"<< std::endl; - exit(1); + auto destination_dir = QDir::current(); + auto target_output = dst_dir->value(); + if (!target_output.isEmpty() && QDir(target_output).exists()) { + destination_dir = QDir(target_output); + } + else{ + std::cout << "ָĿ¼ڣΪ" << destination_dir.absolutePath().toLocal8Bit().data() << std::endl; } - } - - - auto files = source_dir.entryInfoList(QStringList() << "*.story"); - if (files.size()) { - try { - auto parser = std::make_shared(); - auto novel_accesstree = parser->parse(files); + auto files = source_dir.entryInfoList(QStringList() << "*.story"); + std::shared_ptr access_ptr = nullptr; + if (files.size()) { + try { + auto parser = std::make_shared(); + access_ptr = parser->parse(files); + } + catch (lib_syntax::SyntaxException* e) { + qDebug().noquote() << e->message(); + delete e; + exit(0); + } + catch (lib_parse::CheckException* e) { + qDebug().noquote() << e->message(); + delete e; + exit(0); + } + } + if (fmt_opt->value().toInt() == 1 && access_ptr) { QTime time_stamp = QTime::currentTime(); printer::tools_printer tool; - tool.build_fragments(novel_accesstree); - tool.build_refers_network(novel_accesstree); + tool.build_fragments(access_ptr); + tool.build_refers_network(access_ptr); - tool.fragments_anchors_define(tool.fragment_defines.values(), QDir::current()); - tool.storylines_anchors_define(tool.storyline_defines.values(), QDir::current()); - tool.volumes_anchors_define(tool.volume_defines.values(), QDir::current()); + tool.fragments_anchors_define(tool.fragment_defines.values(), destination_dir); + tool.storylines_anchors_define(tool.storyline_defines.values(), destination_dir); + tool.volumes_anchors_define(tool.volume_defines.values(), destination_dir); std::function)> html_output = [](std::shared_ptr inst) { @@ -117,6 +126,7 @@ int main(int argc, char* argv[]) { for (auto& node : tool.volume_defines) html_output(node); + QDir::setCurrent(destination_dir.canonicalPath()); auto dot_src = tool.storylines_paint(tool.storyline_defines.values()); QFile dot_file(QDir::current().filePath(u8"relates.dot")); if (dot_file.open(QIODevice::WriteOnly | QIODevice::Text)) { @@ -199,7 +209,7 @@ int main(int argc, char* argv[]) { int row_ctrl = 0; QDomElement elm_row; for (auto& inst_frag : tool.fragment_defines) { - if(row_ctrl++ % 4 == 0){ + if (row_ctrl++ % 4 == 0) { elm_row = doc_inst.createElement(u8"tr"); table_cube.appendChild(elm_row); } @@ -235,18 +245,15 @@ int main(int argc, char* argv[]) { auto current_stamp = QTime::currentTime(); qDebug() << QString(u8"htmlʱ䣺%1 ms").arg(time_stamp.msecsTo(current_stamp)); - //tnode_print(novel_accesstree, 0); - qDebug() << u8"ɹ" << QDir::current().absoluteFilePath(u8"index.html"); - } - catch (lib_syntax::SyntaxException* e) { - qDebug().noquote() << e->message(); - delete e; - } - catch (lib_parse::CheckException* e) { - qDebug().noquote() << e->message(); - delete e; } + + qDebug() << u8"ɹ" << destination_dir.absoluteFilePath(u8"index.html"); + }break; + default: + break; } + + return 0; //return a.exec(); } diff --git a/libSyntax/ast_gen.cpp b/libSyntax/ast_gen.cpp index 1e3a521..87bd96e 100644 --- a/libSyntax/ast_gen.cpp +++ b/libSyntax/ast_gen.cpp @@ -18,8 +18,8 @@ std::shared_ptr GlobalElement::appendToCache(std::shared_pt return nullptr; } -std::shared_ptr GlobalElement::getNamedNodeBy(int type, const QString& signature) const { - auto mixed_key = QString(u8"%1<%2>").arg(signature).arg(type); +std::shared_ptr GlobalElement::getNamedNodeBy(int paramType, const QString& signature) const { + auto mixed_key = QString(u8"%1<%2>").arg(signature).arg(paramType); if (!node_cache.contains(mixed_key)) return nullptr; return node_cache[mixed_key]; diff --git a/libSyntax/ast_gen.h b/libSyntax/ast_gen.h index d748556..b0c280b 100644 --- a/libSyntax/ast_gen.h +++ b/libSyntax/ast_gen.h @@ -121,7 +121,7 @@ namespace ast_gen * @return * @throws ûָڵ׳쳣 */ - virtual std::shared_ptr getNamedNodeBy(int type, const QString& signature) const; + virtual std::shared_ptr getNamedNodeBy(int paramType, const QString& signature) const; virtual void addChild(std::shared_ptr citem); // ParseElement interface diff --git a/libToken/tokens_novel.cpp b/libToken/tokens_novel.cpp index 3a50f57..77abfd6 100644 --- a/libToken/tokens_novel.cpp +++ b/libToken/tokens_novel.cpp @@ -4,8 +4,8 @@ using namespace example_novel; using namespace lib_token; -TokenContent::TokenContent(int r, int c, const QString& t, const QString& p, std::shared_ptr type) - : row_n(r), col_n(c), text_n(t), path_p(p), type_def(type) {} +TokenContent::TokenContent(int r, int c, const QString& t, const QString& p, std::shared_ptr paramType) + : row_n(r), col_n(c), text_n(t), path_p(p), type_def(paramType) {} QString TokenContent::file() const { return path_p; } @@ -65,7 +65,7 @@ int ReferMark::typeMark() const QString ReferMark::regex() const { return u8"@"; } -Keywords::Keywords(const QString& val, const QString& nm, uint type_code) : value_store(val), name_store(nm), type_code(type_code) {} +Keywords::Keywords(const QString& val, const QString& nm, uint type_code) : means_store(val), name_store(nm), type_code(type_code) {} QString Keywords::typeName() const { return name_store; } @@ -74,7 +74,7 @@ int Keywords::typeMark() const return 0x06000000 | (0x00ffffff & type_code); } -QString Keywords::regex() const { return value_store; } +QString Keywords::regex() const { return means_store; } std::tuple, std::shared_ptr> Keywords::analysis(std::shared_ptr content) const { diff --git a/libToken/tokens_novel.h b/libToken/tokens_novel.h index d2a75a6..4048490 100644 --- a/libToken/tokens_novel.h +++ b/libToken/tokens_novel.h @@ -18,7 +18,7 @@ namespace lib_token { std::shared_ptr type_def; public: - TokenContent(int r, int c, const QString& t, const QString& p, std::shared_ptr type); + TokenContent(int r, int c, const QString& t, const QString& p, std::shared_ptr paramType); // WordBase interface public: @@ -75,7 +75,7 @@ namespace example_novel { class LIBTOKEN_EXPORT Keywords : public lib_token::ITokenDefine, public std::enable_shared_from_this { private: - QString value_store, name_store; + QString means_store, name_store; int type_code; public: