update
This commit is contained in:
parent
93e7edaae8
commit
e9950e20a2
|
@ -550,7 +550,7 @@ void printer::AstGenerate::append_tokens(QDomElement _elm, std::shared_ptr<const
|
|||
|
||||
printer::AstGenerate::AstGenerate()
|
||||
{
|
||||
auto procs = doc.createProcessingInstruction("xml", "version='1.0'");
|
||||
auto procs = doc.createProcessingInstruction("xml", "version='1.0' encoding='utf-8'");
|
||||
doc.appendChild(procs);
|
||||
|
||||
}
|
||||
|
|
|
@ -252,7 +252,13 @@ int main(int argc, char* argv[]) {
|
|||
auto visitor = std::make_shared<printer::AstGenerate>();
|
||||
control.visitWith(access_ptr, visitor);;
|
||||
auto dom_result = visitor->content();
|
||||
qDebug().noquote() << dom_result;
|
||||
QFile file(destination_dir.absoluteFilePath(u8"storyline.xast"));
|
||||
if (file.open(QIODevice::Text | QIODevice::WriteOnly)) {
|
||||
QTextStream tout(&file);
|
||||
tout.setCodec("UTF-8");
|
||||
tout << dom_result;
|
||||
tout.flush();
|
||||
}
|
||||
}
|
||||
}break;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue