]> git.localhorst.tv Git - blobs.git/blob - src/io/Token.hpp
eating and drinking
[blobs.git] / src / io / Token.hpp
1 #ifndef BLOBS_IO_TOKEN_HPP_
2 #define BLOBS_IO_TOKEN_HPP_
3
4 #include <iosfwd>
5 #include <string>
6
7
8 namespace blobs {
9 namespace io {
10
11 struct Token {
12         enum Type {
13                 UNKNOWN = 0,
14                 ANGLE_BRACKET_OPEN = '{',
15                 ANGLE_BRACKET_CLOSE = '}',
16                 CHEVRON_OPEN = '<',
17                 CHEVRON_CLOSE = '>',
18                 BRACKET_OPEN = '[',
19                 BRACKET_CLOSE = ']',
20                 PARENTHESIS_OPEN = '(',
21                 PARENTHESIS_CLOSE = ')',
22                 COLON = ':',
23                 SEMICOLON = ';',
24                 COMMA = ',',
25                 EQUALS = '=',
26                 NUMBER = '0',
27                 STRING = '"',
28                 IDENTIFIER = 'a',
29                 COMMENT = '#',
30         } type = UNKNOWN;
31         std::string value;
32 };
33
34 std::ostream &operator <<(std::ostream &, Token::Type);
35 std::ostream &operator <<(std::ostream &, const Token &);
36
37 }
38 }
39
40 #endif