aboutsummaryrefslogtreecommitdiff
path: root/src/utils.h
blob: 9727d6a4f83a8f1152d61eab02de8c311a430c43 (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
28
#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,
	VALUE_IDENTIFIER  = -2,
};

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

}

#endif  // PARSER_SRC_UTILS_H_