githelper.git/
githelper.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2011-04-25
2011-04-25 16:38:10 by Martin Stjernholm <mast@lysator.liu.se>
4409b4df15e41b9499220dcb7dee08542b0cabd9 (
10
lines) (+
7
/-
3
)
[
Show
|
Annotate
]
Branch:
master
Fixed recognition of unterminated idents.
346:
{ int p=0; while ((p = search(data, DOLLAR"Id", p))>=0) {
-
if (data[p..p+3] != unexpanded_id)
+
if (data[p..p+3] != unexpanded_id)
{
+
int p2 = search(data, DOLLAR, p+3), p3 = search(data, "\n", p+3);
+
if (p2 > p && (p3 < 0 || p2 < p3))
return 1;
-
+
}
p += 4; } return 0;
724:
int p=0; while((p=search(f, DOLLAR"Id", p)) >= 0) { int p2 = search(f, DOLLAR, p+3), p3 = search(f, "\n", p+3);
-
if (p2 > p && p2 < p3) {
+
if (p2 > p &&
(p3 < 0 ||
p2 < p3)
)
{
string r = replace(f[p..p2]); if (r) { // werror("Replacing %O with %O\n", f[p..p2], r);