summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2022-04-10 10:21:12 -0500
committerHombreLaser <sebastian-440@live.com>2022-04-10 10:21:12 -0500
commit531f8f2f1adc1c6777920f0a8c68caaee30b0fc4 (patch)
treec3d8ac22f3ecc118cd2b5056e7ac556371efaca7 /main.cpp
parentae25e110ca9d65c4e2cfffef21abc16f26ac3739 (diff)
Corregidos errores de las expresiones.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/main.cpp b/main.cpp
index a7e81bb..0d95196 100644
--- a/main.cpp
+++ b/main.cpp
@@ -4,6 +4,7 @@
#include <vector>
#include <iostream>
#include "include/parser.hpp"
+#include "include/expressions.hpp"
#include "include/exceptions.hpp"
using std::string, std::cin, std::cout, std::getline, std::vector,
@@ -15,19 +16,13 @@ int main(){
getline(cin, input);
- try
- {
- parser.parse(input);
- cout << "Todo correcto." << endl;
- }
- catch(ParserException e)
- {
- cout << e.showMsg() << endl;
- }
- catch(LexerException e)
- {
- cout << e.showMsg() << endl;
- }
+ //try {
+ Expression *tree = parser.parse(input);
+ cout << tree->getRepr() << endl;
+ //} catch(const ParserException &e) {
+ //cout << e.showMsg() << endl;
+ //}
+ delete tree;
return 0;
}