-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToken.h
More file actions
33 lines (28 loc) · 699 Bytes
/
Token.h
File metadata and controls
33 lines (28 loc) · 699 Bytes
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
29
30
31
32
33
//
// Created by nisal on 7/19/2023.
//
#ifndef RPAL_FINAL_TOKEN_H
#define RPAL_FINAL_TOKEN_H
#include <string>
/**
* Enumeration of token types.
*/
enum token_type
{
IDENTIFIER, // Represents an identifier token
INTEGER, // Represents an integer token
STRING, // Represents a string token
OPERATOR, // Represents an operator token
DELIMITER, // Represents a delimiter token
KEYWORD, // Represents a keyword token
END_OF_FILE // Represents the end of file token
};
/**
* Structure representing a token.
*/
struct Token
{
token_type type; // The type of the token
std::string value; // The value of the token
};
#endif //RPAL_FINAL_TOKEN_H