aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-21 00:36:21 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-21 00:36:21 +0100
commitcefca2396003bdc69c0fd0eb90258e56148bf256 (patch)
tree74089da9a66a81cb5a373dc2c17b995ce4f7bf82 /parser.cpp
parentcfc026aaae9bb0706ffffdcfedbc063a12409542 (diff)
downloadsciteco-cefca2396003bdc69c0fd0eb90258e56148bf256.tar.gz
<n>A command to get ASCII code from buffer (at position DOT+n)
classic TECO's append-buffer command is not supported * currently, num_sign is implied for A, that is -A will retrieve the value before DOT, while "A" will retrieve after (not at) DOT
Diffstat (limited to 'parser.cpp')
-rw-r--r--parser.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/parser.cpp b/parser.cpp
index 04c7a3e..92e6ac7 100644
--- a/parser.cpp
+++ b/parser.cpp
@@ -925,6 +925,15 @@ StateStart::custom(gchar chr) throw (Error)
break;
}
+ case 'A':
+ BEGIN_EXEC(this);
+ v = interface.ssm(SCI_GETCURRENTPOS) +
+ expressions.pop_num_calc();
+ if (!Validate::pos(v))
+ throw RangeError("A");
+ expressions.push(interface.ssm(SCI_GETCHARAT, v));
+ break;
+
default:
throw SyntaxError(chr);
}