aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.cpp
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.cpp
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.cpp')
-rw-r--r--parser.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/parser.cpp b/parser.cpp
index cf938b0..b862973 100644
--- a/parser.cpp
+++ b/parser.cpp
@@ -22,7 +22,7 @@ gint macro_pc = 0;
namespace States {
StateStart start;
StateControl control;
- StateFlowCommand flowcommand;
+ StateFCommand fcommand;
StateCondCommand condcommand;
StateECommand ecommand;
StateScintilla_symbols scintilla_symbols;
@@ -446,7 +446,7 @@ StateStart::StateStart() : State()
transitions['!'] = &States::label;
transitions['O'] = &States::gotocmd;
transitions['^'] = &States::control;
- transitions['F'] = &States::flowcommand;
+ transitions['F'] = &States::fcommand;
transitions['"'] = &States::condcommand;
transitions['E'] = &States::ecommand;
transitions['I'] = &States::insert;
@@ -1012,13 +1012,14 @@ StateStart::custom(gchar chr) throw (Error)
return this;
}
-StateFlowCommand::StateFlowCommand() : State()
+StateFCommand::StateFCommand() : State()
{
transitions['\0'] = this;
+ transitions['S'] = &States::replace;
}
State *
-StateFlowCommand::custom(gchar chr) throw (Error)
+StateFCommand::custom(gchar chr) throw (Error)
{
switch (chr) {
/*