|
9 | 9 | #include "interpreter/interpreter.h" |
10 | 10 | #include "context/context.h" |
11 | 11 |
|
12 | | -const std::string bsversion = "0.1.6"; |
| 12 | +const std::string bsversion = "0.1.6.1"; |
13 | 13 |
|
14 | 14 | enum optionIndex { CLI_UNKNOWN, CLI_HELP, CLI_NODEBUG }; |
15 | 15 | const option::Descriptor usage[] = |
@@ -74,22 +74,21 @@ int main(int argc, char* argv[]) { |
74 | 74 | std::cout << abSyTree.error->to_string() << std::endl; |
75 | 75 | std::cout << "--------------------------" << std::endl; |
76 | 76 | continue; |
77 | | - } else { |
78 | | - if (printDebug) { |
79 | | - std::cout << std::endl; |
80 | | - std::cout << abSyTree.node->to_string() << std::endl; |
81 | | - std::cout << std::endl; |
82 | | - } |
| 77 | + } |
| 78 | + if (printDebug) { |
| 79 | + std::cout << std::endl; |
| 80 | + std::cout << abSyTree.node->to_string() << std::endl; |
| 81 | + std::cout << std::endl; |
| 82 | + } |
83 | 83 |
|
84 | | - Interpreter interpreter; |
85 | | - RuntimeResult rt = interpreter.visit(abSyTree.node, context); |
86 | | - if (rt.hasError()) { |
87 | | - std::cout << rt.error->to_string() << std::endl; |
88 | | - std::cout << "--------------------------" << std::endl; |
89 | | - } else { |
90 | | - std::cout << rt.object->to_string() << std::endl; |
91 | | - } |
| 84 | + Interpreter interpreter; |
| 85 | + RuntimeResult rt = interpreter.visit(abSyTree.node, context); |
| 86 | + if (rt.hasError()) { |
| 87 | + std::cout << rt.error->to_string() << std::endl; |
| 88 | + std::cout << "--------------------------" << std::endl; |
| 89 | + continue; |
92 | 90 | } |
| 91 | + std::cout << rt.object->to_string() << std::endl; |
93 | 92 | } |
94 | 93 | if (printDebug) std::cout << "--------------------------" << std::endl; |
95 | 94 | } |
|
0 commit comments