another ugly basic implementation

This commit is contained in:
2021-07-04 15:03:13 +02:00
parent b55115f7c3
commit b4711985b3
12 changed files with 417 additions and 60 deletions

View File

@@ -40,6 +40,7 @@ enum class TokenType {
close_paren,
logical_and,
logical_or,
pipe,
semicolon,
comma,
newline,
@@ -61,7 +62,8 @@ public:
void debugTokens();
Token currentToken();
Token currentToken();
Token consumeCurrentToken();
void nextToken();
@@ -72,7 +74,8 @@ public:
TokenType nextTokenType();
TokenType prevTokenType();
static bool isRelationalOperator(TokenType token_type);
static bool isRelationalOperator(TokenType token_type);
static bool isLogicalOperator(TokenType token_type);
private:
TokenType type(const std::string &token);