aboutsummaryrefslogtreecommitdiff
path: root/src/utils.h
blob: 6e4360588d5f16fe1e4663f8afad180a01f673ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef PARSER_SRC_UTILS_H_
#define PARSER_SRC_UTILS_H_

#include <string>
#include <vector>

#include "nodes.h"

namespace SimpleParser {

enum class TokenType : int8_t {
	OPERATOR_PLUS     = 10,
	OPERATOR_MINUS    = 11,
	OPERATOR_DIVIDE   = 20,
	OPERATOR_MULTIPLY = 21,
	OPERATOR_POWER    = 30,
	PARENTHESES_OPEN  = 90,
	PARENTHESES_CLOSE = 91,
	VALUE_NUMBER      = -1,
};

TokenType getTokenType(char);
std::vector<std::string> lexer(std::string);

}

#endif  // PARSER_SRC_UTILS_H_