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