diff options
Diffstat (limited to 'src/parser.h')
-rw-r--r-- | src/parser.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/parser.h b/src/parser.h index e3c810c..e249c68 100644 --- a/src/parser.h +++ b/src/parser.h @@ -194,6 +194,12 @@ protected: virtual State *done(const gchar *str) throw (Error) = 0; }; +class StateExpectFile : public StateExpectString { +public: + StateExpectFile(bool _building = true, bool _last = true) + : StateExpectString(_building, _last) {} +}; + class StateStart : public State { public: StateStart(); @@ -291,6 +297,12 @@ namespace States { { return dynamic_cast<StateExpectString *>(current); } + + static inline bool + is_file() + { + return dynamic_cast<StateExpectFile *>(current); + } } extern enum Mode { |