Skip to content

Commit b8dada3

Browse files
committed
ADD:
1. `token_type` for both lexer and parser construction
1 parent e785f5b commit b8dada3

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/**
2+
* @file token.hh
3+
* @license This file is licensed under the GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007. You may obtain a copy of this license at https://www.gnu.org/licenses/gpl-3.0.en.html.
4+
* @author Tushar Chaurasia (Dark-CodeX)
5+
*/
6+
7+
#ifndef SIMULATOR_TOKEN
8+
#define SIMULATOR_TOKEN
9+
10+
#include <string>
11+
12+
namespace simulator
13+
{
14+
enum token_type : unsigned char
15+
{
16+
IDEN,
17+
COLON,
18+
SEP
19+
};
20+
21+
struct token
22+
{
23+
token_type M_type;
24+
std::string M_val;
25+
};
26+
};
27+
28+
#endif

0 commit comments

Comments
 (0)