aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/main.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/cli/main.cpp b/cli/main.cpp
index 21bb1ca..64f01ab 100644
--- a/cli/main.cpp
+++ b/cli/main.cpp
@@ -116,8 +116,7 @@ void startDiceParsing(QString& cmd,QString& treeFile,bool highlight)
if(parser->parseLine(cmd))
{
//
- if(treeFile.isEmpty())
- {
+
parser->Start();
if(!parser->getErrorMap().isEmpty())
{
@@ -150,11 +149,10 @@ void startDiceParsing(QString& cmd,QString& treeFile,bool highlight)
str = parser->getStringResult();
}
out << str << "\n";
- }
- else
- {
- parser->writeDownDotTree(treeFile);
- }
+ if(!treeFile.isEmpty())
+ {
+ parser->writeDownDotTree(treeFile);
+ }
}
else
{