You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
411 B

#pragma once
#include "webserv.hpp"
2 years ago
enum TOKEN { CURLY_OPEN, CURLY_CLOSE, COLON, STRING, NUMBER, ARRAY_OPEN, ARRAY_CLOSE, COMMA, BOOLEAN, NULL_TYPE };
typedef struct Token_s {
2 years ago
string value;
2 years ago
TOKEN type;
} Token;
class Tokenizer {
2 years ago
std::fstream file;
2 years ago
size_t prevPos;
2 years ago
public:
2 years ago
Tokenizer(string fileName);
2 years ago
bool hasMoreTokens();
char getWithoutWhiteSpace();
void rollBackToken();
2 years ago
Token getToken();
};