去除冗余的结构信息
This commit is contained in:
parent
a7488df082
commit
e07354c527
|
@ -6,9 +6,9 @@
|
||||||
<LocalDebuggerCommandArguments>-path "D:\手作小说\科学+修仙+创造世界"</LocalDebuggerCommandArguments>
|
<LocalDebuggerCommandArguments>-path "D:\手作小说\科学+修仙+创造世界"</LocalDebuggerCommandArguments>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<QtLastBackgroundBuild>2024-05-26T03:00:46.1252886Z</QtLastBackgroundBuild>
|
<QtLastBackgroundBuild>2024-06-04T12:14:58.9515031Z</QtLastBackgroundBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<QtLastBackgroundBuild>2024-05-26T03:00:46.2759396Z</QtLastBackgroundBuild>
|
<QtLastBackgroundBuild>2024-06-04T12:14:59.0770864Z</QtLastBackgroundBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -16,6 +16,20 @@
|
||||||
|
|
||||||
using namespace example_novel;
|
using namespace example_novel;
|
||||||
|
|
||||||
|
std::function<void(std::shared_ptr<const ast_gen::ElementAccess>, int)> tnode_print =
|
||||||
|
[&](std::shared_ptr<const ast_gen::ElementAccess> 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);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
QCoreApplication a(argc, argv);
|
QCoreApplication a(argc, argv);
|
||||||
|
|
||||||
|
@ -94,19 +108,6 @@ int main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
system("fdp -Tsvg volumes_group.dot -o volumes_group.svg");
|
system("fdp -Tsvg volumes_group.dot -o volumes_group.svg");
|
||||||
|
|
||||||
std::function<void(std::shared_ptr<const ast_gen::ElementAccess>, int)> tnode_print =
|
|
||||||
[&](std::shared_ptr<const ast_gen::ElementAccess> 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);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
{
|
{
|
||||||
QFile tfile("./index.html");
|
QFile tfile("./index.html");
|
||||||
|
@ -193,7 +194,8 @@ int main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tnode_print(novel_accesstree, 0);
|
//tnode_print(novel_accesstree, 0);
|
||||||
|
qDebug() << u8"±àÒë³É¹¦£º" << QDir::current().absoluteFilePath(u8"index.html");
|
||||||
}
|
}
|
||||||
catch (lib_syntax::SyntaxException* e) {
|
catch (lib_syntax::SyntaxException* e) {
|
||||||
qDebug().noquote() << e->message();
|
qDebug().noquote() << e->message();
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<QtLastBackgroundBuild>2024-05-26T03:00:46.6593548Z</QtLastBackgroundBuild>
|
<QtLastBackgroundBuild>2024-06-04T12:14:59.3510858Z</QtLastBackgroundBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<QtLastBackgroundBuild>2024-05-26T03:00:46.7674012Z</QtLastBackgroundBuild>
|
<QtLastBackgroundBuild>2024-06-04T12:14:59.4330831Z</QtLastBackgroundBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -5,9 +5,9 @@
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<QtLastBackgroundBuild>2024-05-26T03:00:46.5033717Z</QtLastBackgroundBuild>
|
<QtLastBackgroundBuild>2024-06-04T12:14:59.1190864Z</QtLastBackgroundBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<QtLastBackgroundBuild>2024-05-26T03:00:46.6093560Z</QtLastBackgroundBuild>
|
<QtLastBackgroundBuild>2024-06-04T12:14:59.1920999Z</QtLastBackgroundBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -2,9 +2,9 @@
|
||||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<QtLastBackgroundBuild>2024-05-26T03:00:46.3513401Z</QtLastBackgroundBuild>
|
<QtLastBackgroundBuild>2024-06-04T12:14:59.2310840Z</QtLastBackgroundBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<QtLastBackgroundBuild>2024-05-26T03:00:46.4494964Z</QtLastBackgroundBuild>
|
<QtLastBackgroundBuild>2024-06-04T12:14:59.3070840Z</QtLastBackgroundBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
Reference in New Issue