aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parser.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2013-03-13 17:16:18 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2013-03-16 18:07:32 +0100
commit71340a99dc4bf43ea110a76c0ed3bbccd8989f22 (patch)
tree0b1943626ca9d6262a740a613d1b8496dee717ef /src/parser.h
parent1c4c0acaeb284c5b65c6e117fdf2d2aa3c4dbdcb (diff)
downloadsciteco-71340a99dc4bf43ea110a76c0ed3bbccd8989f22.tar.gz
common parent state for all file-name-expecting commands: fixes EM tab-completions
* StateExpectFile adds no functionality (currently), but is useful for checking state types
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h12
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 {