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.

33 lines
419 B

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