diff --git a/src/etc/lexer.cpp b/src/etc/lexer.cpp index 418594e..184109f 100644 --- a/src/etc/lexer.cpp +++ b/src/etc/lexer.cpp @@ -4,10 +4,6 @@ using namespace std; vector resVal; -void separate() {resVal.emplace_back(tok::SEPARATOR, "");} - -bool longLex = false; - tok::type getIdentifierCharType(const char& Char) { if (isalpha(Char)) return tok::IDENTIFIER; else if (isdigit(Char)) return tok::NUMBER; @@ -17,6 +13,7 @@ tok::type getIdentifierCharType(const char& Char) { vector& lex(const string& in) { + bool longLex = false; pair generated; for (const char& current : in) { if (!longLex) { @@ -39,7 +36,7 @@ vector& lex(const string& in) case '<': resVal.emplace_back(tok::RCOMP, "<"); break; case '\'': resVal.emplace_back(tok::SQUOTE, "\'"); break; case ' ': case '\t': case '\r': - case '\n': separate(); break; + case '\n': break; default: { tok::type type = getIdentifierCharType(current); switch (type) { diff --git a/src/headers/lex.hpp b/src/headers/lex.hpp index a5924b1..c1997ff 100644 --- a/src/headers/lex.hpp +++ b/src/headers/lex.hpp @@ -11,7 +11,6 @@ struct tok { SQUOTE, STRING, IDENTIFIER, - SEPARATOR, UNEXPECTED }; type toktype;