aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-12-03 00:45:25 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-12-03 03:54:00 +0100
commit14246a1c5a8b542eadd19d74640d9e69c7df9b98 (patch)
tree09ec8402e77e33ac6a1cbc5bd613eaec21a3e654 /parser.h
parent2d626d832ba4d05fa71b9a403d5682e63fe7343c (diff)
downloadsciteco-14246a1c5a8b542eadd19d74640d9e69c7df9b98.tar.gz
first draft of N command based on S
Diffstat (limited to 'parser.h')
-rw-r--r--parser.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/parser.h b/parser.h
index c21f872..86751bc 100644
--- a/parser.h
+++ b/parser.h
@@ -225,11 +225,13 @@ private:
};
class StateSearch : public StateExpectString {
-private:
+protected:
struct Parameters {
gint dot;
gint from, to;
gint count;
+
+ Buffer *from_buffer, *to_buffer;
} parameters;
enum MatchState {
@@ -244,9 +246,16 @@ private:
gchar *class2regexp(MatchState &state, const gchar *&pattern,
bool escape_default = false);
gchar *pattern2regexp(const gchar *&pattern, bool single_expr = false);
+ void do_search(GRegex *re, gint from, gint to, gint &count);
+ virtual void initial(void) throw (Error);
+ virtual void process(const gchar *str, gint new_chars) throw (Error);
+ virtual State *done(const gchar *str) throw (Error);
+};
+
+class StateSearchAll : public StateSearch {
+private:
void initial(void) throw (Error);
- void process(const gchar *str, gint new_chars) throw (Error);
State *done(const gchar *str) throw (Error);
};
@@ -260,6 +269,7 @@ namespace States {
extern StateScintilla_lParam scintilla_lparam;
extern StateInsert insert;
extern StateSearch search;
+ extern StateSearchAll searchall;
extern State *current;
}