aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-12-04 03:15:24 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-12-04 03:15:24 +0100
commit457fe1498d5fe88e0447ddecd617281f7afd3304 (patch)
tree15f1d8a3c4c6c20e678a5eef2559b7ad2a8e91ab /parser.h
parentaca9517b3d90180581570596cb5ac768ef8c127e (diff)
downloadsciteco-457fe1498d5fe88e0447ddecd617281f7afd3304.tar.gz
search and replace command (FS)
* makes use of Scintilla selections, so their usage has been improved * search commands preserve selection on termination (escape) * selections are restored on rubout * search-replace command makes use of the Insert command's state (may serve as a base class now) but does not pop additional values from stack (like "I" does)
Diffstat (limited to 'parser.h')
-rw-r--r--parser.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/parser.h b/parser.h
index ab0e381..4ae9db6 100644
--- a/parser.h
+++ b/parser.h
@@ -180,9 +180,9 @@ private:
State *custom(gchar chr) throw (Error);
};
-class StateFlowCommand : public State {
+class StateFCommand : public State {
public:
- StateFlowCommand();
+ StateFCommand();
private:
State *custom(gchar chr) throw (Error);
@@ -217,8 +217,11 @@ private:
State *done(const gchar *str) throw (Error);
};
+/*
+ * also serves as base class for replace-insertion states
+ */
class StateInsert : public StateExpectString {
-private:
+protected:
void initial(void) throw (Error);
void process(const gchar *str, gint new_chars) throw (Error);
State *done(const gchar *str) throw (Error);
@@ -227,7 +230,7 @@ private:
namespace States {
extern StateStart start;
extern StateControl control;
- extern StateFlowCommand flowcommand;
+ extern StateFCommand fcommand;
extern StateCondCommand condcommand;
extern StateECommand ecommand;
extern StateScintilla_symbols scintilla_symbols;