This commit is contained in:
codeboss 2024-06-19 22:45:55 +08:00
parent aafca777a4
commit 3d414678ea
11 changed files with 60 additions and 37 deletions

View File

@ -23,6 +23,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决方案项", "{8548B2EE-059F-40ED-B393-9513E6095930}"
ProjectSection(SolutionItems) = preProject
报告20240618-1929.diagsession = 报告20240618-1929.diagsession
报告20240619-1206.diagsession = 报告20240619-1206.diagsession
EndProjectSection
EndProject
Global

View File

@ -43,7 +43,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings">
<QtInstall>5.12.11_msvc2017_64</QtInstall>
<QtModules>core</QtModules>
<QtModules>core;xml</QtModules>
<QtBuildConfig>release</QtBuildConfig>
</PropertyGroup>
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
@ -66,16 +66,23 @@
<TargetName>nsc</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<IncludePath>$(SolutionDir)libToken;$(SolutionDir)libSyntax;$(SolutionDir)libParse;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
<TargetName>nsc</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Link>
<AdditionalDependencies>libToken.lib;libSyntax.lib;libParse.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<ClCompile>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalOptions>/Zc:char8_t- %(AdditionalOptions)</AdditionalOptions>
<LanguageStandard>Default</LanguageStandard>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Link>
<AdditionalDependencies>libToken.lib;libSyntax.lib;libParse.lib;%(AdditionalDependencies);$(Qt_LIBS_)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="Configuration">
<ClCompile>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>

View File

@ -5,13 +5,18 @@
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>--path "D:\手作小说\科学+修仙+创造世界"</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerCommandArguments>--path "D:\手作小说\科学+修仙+创造世界"</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerWorkingDirectory>$(SolutionDir)$(Platform)\$(Configuration)\</LocalDebuggerWorkingDirectory>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2024-06-19T03:41:21.9792038Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-06-19T04:38:19.5151106Z</QtLastBackgroundBuild>
<QtTouchProperty>
</QtTouchProperty>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2024-06-19T03:41:22.1198275Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-06-19T04:51:19.6494512Z</QtLastBackgroundBuild>
<QtTouchProperty>
</QtTouchProperty>
</PropertyGroup>

View File

@ -163,8 +163,7 @@ void FragmentRef::buildSliceHTML(QDomElement& dom_parent) const {
[&](QDomElement& parent_element, const QList<std::shared_ptr<const ast_gen::ElementAccess>> children) {
for (auto& child : children) {
auto doc_ins = parent_element.ownerDocument();
switch ((NovelNode)child->element()->typeMark())
{
switch ((NovelNode)child->element()->typeMark()) {
case NovelNode::TextSection: {
auto text_inst = std::dynamic_pointer_cast<const TextSection>(child->element());
auto dom_p = doc_ins.createElement("p");

View File

@ -65,16 +65,22 @@
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<IncludePath>$(SolutionDir)libToken\;$(SolutionDir)libSyntax\;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Link>
<AdditionalDependencies>libToken.lib;libSyntax.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libToken.lib;libSyntax.lib;%(AdditionalDependencies);$(Qt_LIBS_)</AdditionalDependencies>
</Link>
<ClCompile>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalOptions>/Zc:char8_t- %(AdditionalOptions)</AdditionalOptions>
<LanguageStandard>Default</LanguageStandard>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Link>
<AdditionalDependencies>libToken.lib;libSyntax.lib;%(AdditionalDependencies);$(Qt_LIBS_)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="Configuration">
<ClCompile>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>

View File

@ -5,12 +5,12 @@
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2024-06-19T03:41:22.1667034Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-06-19T04:38:19.8243177Z</QtLastBackgroundBuild>
<QtTouchProperty>
</QtTouchProperty>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2024-06-19T03:41:22.2604525Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-06-19T04:38:19.9003239Z</QtLastBackgroundBuild>
<QtTouchProperty>
</QtTouchProperty>
</PropertyGroup>

View File

@ -10,8 +10,8 @@ using namespace ast_gen;
using namespace lib_syntax;
using namespace example_novel;
void FragmentExistsCheck::exists_check(std::shared_ptr<const ast_gen::GlobalElement> root,
std::shared_ptr<const ast_gen::ElementAccess> target) const {
void FragmentExistsCheck::exists_check(std::shared_ptr<const GlobalElement> root,
std::shared_ptr<const ElementAccess> target) const {
if (target->element()->typeMark() == (int)NovelNode::FragmentRefer) {
auto refer = std::dynamic_pointer_cast<const FragmentRefers>(target->element());
auto signature = refer->storyRefer() + u8"&" + refer->fragmentRefer();
@ -23,15 +23,15 @@ void FragmentExistsCheck::exists_check(std::shared_ptr<const ast_gen::GlobalElem
}
}
void FragmentExistsCheck::validCheck(std::shared_ptr<const ast_gen::ElementAccess> root) const {
this->exists_check(std::dynamic_pointer_cast<const ast_gen::GlobalElement>(root->element()), root);
void FragmentExistsCheck::validCheck(std::shared_ptr<const ElementAccess> root) const {
this->exists_check(std::dynamic_pointer_cast<const GlobalElement>(root->element()), root);
}
QString FragmentExistsCheck::name() const {
return u8"FragmentExistsCheck";
}
QList<std::shared_ptr<FragmentGraphHelper>> example_novel::FragmentGraphCheck::refers_cycle_check(
QList<std::shared_ptr<FragmentGraphHelper>> FragmentGraphCheck::refers_cycle_check(
std::shared_ptr<FragmentGraphHelper> item, QList<std::shared_ptr<FragmentGraphHelper>> prevs) const {
if (prevs.contains(item)) {
return prevs << item;
@ -60,7 +60,7 @@ std::shared_ptr<FragmentGraphHelper> FragmentGraphCheck::getElement(const QStrin
return elements_store[signature];
}
QList<std::shared_ptr<FragmentGraphHelper>> example_novel::FragmentGraphCheck::getHangoutNodes() {
QList<std::shared_ptr<FragmentGraphHelper>> FragmentGraphCheck::getHangoutNodes() {
QList<std::shared_ptr<FragmentGraphHelper>> values;
for (auto node_item : elements_store) {
@ -76,7 +76,7 @@ QList<std::shared_ptr<FragmentGraphHelper>> example_novel::FragmentGraphCheck::g
return values;
}
bool example_novel::FragmentGraphCheck::nodeDismantle(std::shared_ptr<FragmentGraphHelper> inst) {
bool FragmentGraphCheck::nodeDismantle(std::shared_ptr<FragmentGraphHelper> inst) {
bool flag = false;
for (auto item : inst->nextList()) {
@ -87,11 +87,11 @@ bool example_novel::FragmentGraphCheck::nodeDismantle(std::shared_ptr<FragmentGr
return flag;
}
void FragmentGraphCheck::validCheck(std::shared_ptr<const ast_gen::ElementAccess> root) const
void FragmentGraphCheck::validCheck(std::shared_ptr<const ElementAccess> root) const
{
std::function<QList<std::shared_ptr<const ast_gen::ElementAccess>>(std::shared_ptr<const ast_gen::ElementAccess>)> story_peak
= [&](std::shared_ptr<const ast_gen::ElementAccess> root)->QList<std::shared_ptr<const ast_gen::ElementAccess>> {
QList<std::shared_ptr<const ast_gen::ElementAccess>> return_temp;
std::function<QList<std::shared_ptr<const ElementAccess>>(std::shared_ptr<const ElementAccess>)> story_peak
= [&](std::shared_ptr<const ElementAccess> root)->QList<std::shared_ptr<const ElementAccess>> {
QList<std::shared_ptr<const ElementAccess>> return_temp;
auto type_mark = (NovelNode)root->element()->typeMark();
if (type_mark == NovelNode::StoryDefine) {
@ -146,14 +146,14 @@ void FragmentGraphCheck::validCheck(std::shared_ptr<const ast_gen::ElementAccess
}
}
auto get_name = [](std::shared_ptr<const ast_gen::ElementAccess> node)->QString {
auto get_name = [](std::shared_ptr<const ElementAccess> node)->QString {
switch (node->element()->typeMark()) {
case (int)NovelNode::FragmentDefine: {
auto def_node = std::dynamic_pointer_cast<const example_novel::FragmentDefine>(node->element());
auto def_node = std::dynamic_pointer_cast<const FragmentDefine>(node->element());
return def_node->signature();
}break;
case (int)NovelNode::FragmentRefer: {
auto ref_node = std::dynamic_pointer_cast<const example_novel::FragmentRefers>(node->element());
auto ref_node = std::dynamic_pointer_cast<const FragmentRefers>(node->element());
return ref_node->referSignature();
}break;
}
@ -199,7 +199,7 @@ void FragmentGraphCheck::validCheck(std::shared_ptr<const ast_gen::ElementAccess
}
}
QString example_novel::FragmentGraphCheck::name() const {
QString FragmentGraphCheck::name() const {
return u8"FragmentGraphCheck";
}

View File

@ -65,16 +65,22 @@
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<IncludePath>$(SolutionDir)libToken\;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)$(Platform)\$(Configuration)\;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Link>
<AdditionalDependencies>libToken.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libToken.lib;%(AdditionalDependencies);$(Qt_LIBS_)</AdditionalDependencies>
</Link>
<ClCompile>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalOptions>/Zc:char8_t- %(AdditionalOptions)</AdditionalOptions>
<LanguageStandard>Default</LanguageStandard>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Link>
<AdditionalDependencies>libToken.lib;%(AdditionalDependencies);$(Qt_LIBS_)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="Configuration">
<ClCompile>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>

View File

@ -5,12 +5,12 @@
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2024-06-19T03:41:22.4167016Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-06-19T04:38:19.7103238Z</QtLastBackgroundBuild>
<QtTouchProperty>
</QtTouchProperty>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2024-06-19T03:41:22.5104526Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-06-19T04:38:19.7823175Z</QtLastBackgroundBuild>
<QtTouchProperty>
</QtTouchProperty>
</PropertyGroup>

View File

@ -66,13 +66,12 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<LanguageStandard>stdcpp20</LanguageStandard>
<LanguageStandard>Default</LanguageStandard>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalOptions>/Zc:char8_t- %(AdditionalOptions)</AdditionalOptions>
<LanguageStandard>Default</LanguageStandard>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="Configuration">

View File

@ -2,12 +2,12 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2024-06-19T03:41:22.3229534Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-06-19T04:38:19.9403175Z</QtLastBackgroundBuild>
<QtTouchProperty>
</QtTouchProperty>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2024-06-19T03:41:22.3698305Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-06-19T04:38:20.0313172Z</QtLastBackgroundBuild>
<QtTouchProperty>
</QtTouchProperty>
</PropertyGroup>