aboutsummaryrefslogtreecommitdiffstats
path: root/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parser.cpp')
-rw-r--r--parser.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/parser.cpp b/parser.cpp
index 91e4067..76da588 100644
--- a/parser.cpp
+++ b/parser.cpp
@@ -1,9 +1,10 @@
#include "parser.h"
#include <string>
#include <vector>
+#include "token.h"
Parser::Parser(std::string& input) {
- std::vector<std::string> result;
+ std::vector<Token> result;
bool isString = false;
std::string tmp;
@@ -14,7 +15,8 @@ Parser::Parser(std::string& input) {
}
if (c == '"' && isString) {
- result.push_back(tmp);
+ Token token(tmp, true);
+ result.push_back(token);
tmp = "";
isString = false;
continue;
@@ -22,7 +24,8 @@ Parser::Parser(std::string& input) {
if (!isString) {
std::string parsed(1, c);
- result.push_back(parsed);
+ Token token(parsed, false);
+ result.push_back(token);
}
else {
tmp += c;