]> git.localhorst.tv Git - blobs.git/blob - src/io/Tokenizer.hpp
eating and drinking
[blobs.git] / src / io / Tokenizer.hpp
1 #ifndef BLOBS_IO_TOKENIZER_HPP_
2 #define BLOBS_IO_TOKENIZER_HPP_
3
4 #include "Token.hpp"
5
6 #include <iosfwd>
7
8
9 namespace blobs {
10 namespace io {
11
12 class Tokenizer {
13
14 public:
15
16 public:
17         explicit Tokenizer(std::istream &in);
18
19         bool HasMore();
20         const Token &Next();
21         const Token &Current() const noexcept { return current; }
22
23 private:
24         void ReadToken();
25
26         void ReadNumber();
27         void ReadString();
28         void ReadComment();
29         void ReadIdentifier();
30
31         std::istream &in;
32         Token current;
33
34 };
35
36 }
37 }
38
39 #endif