diff options
author | John Hodge (bugs) <tpg@mutabah.net> | 2014-11-22 23:36:20 +0800 |
---|---|---|
committer | John Hodge (bugs) <tpg@mutabah.net> | 2014-11-22 23:36:20 +0800 |
commit | 7ad1a8b4b40784e0a10bd453c75dd0dcf123d5f1 (patch) | |
tree | 0172ed546bdb00e86297d8d36d7cb0a0a1d111f3 /parse/preproc.hpp | |
download | mrust-7ad1a8b4b40784e0a10bd453c75dd0dcf123d5f1.tar.gz |
Initial commit, lexer structurally complete, parsing hacking up
Diffstat (limited to 'parse/preproc.hpp')
-rw-r--r-- | parse/preproc.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/parse/preproc.hpp b/parse/preproc.hpp new file mode 100644 index 00000000..827ce249 --- /dev/null +++ b/parse/preproc.hpp @@ -0,0 +1,24 @@ +#ifndef PREPROC_H
+#define PREPROC_H
+
+#include "lex.hpp"
+
+class Preproc:
+ public TokenStream
+{
+ Lexer m_lex;
+
+ bool m_cache_valid;
+ Token m_cache;
+
+public:
+ Preproc(::std::string path);
+ ~Preproc();
+
+ virtual Token getToken();
+ virtual void putback(Token tok);
+private:
+ Token getTokenInt();
+};
+
+#endif // PREPROC_H
|