Kaydet (Commit) be2b2803 authored tarafından Markus Heidelberg's avatar Markus Heidelberg Kaydeden (comit) Colomban Wendling

python: do not ignore the character after a skipped string

Regression for the triple start string issue has been introduced in SVN
revision 669 (fishman git a314e11158307db84c0dadb758846b2302fe69cd) on
2008-06-11. In ctags 5.7 it did work, in 5.8 not anymore.
See also http://sourceforge.net/p/ctags/bugs/229/ for the original bug,
which led to the old fix.

The other issue with normal strings in skipEverything() is even older.
üst 99a509de
......@@ -266,6 +266,8 @@ static const char *skipEverything (const char *cp)
}
if (isIdentifierFirstCharacter ((int) *cp))
return cp;
if (match)
cp--; /* avoid jumping over the character after a skipped string */
}
return cp;
}
......@@ -536,6 +538,7 @@ static char const *find_triple_start(char const *string, char const **which)
}
cp = skipString(cp);
if (!*cp) break;
cp--; /* avoid jumping over the character after a skipped string */
}
}
return NULL;
......
......@@ -228,6 +228,7 @@ test_sources = \
prototype.h \
pure_elem.f95 \
py_constructor_arglist.py \
py-skipped-string.py \
qualified_types.f90 \
random.sql \
readlob.sql \
......
# triple start string immediately after a normal string not detected
def f1():
''"""
The string above was not detected as triple start string,
but the one below instead.
"""
print "f1"
def f2():
''"""
The string above was then detected as end string,
and the one below as start string again.
"""
print "f2"
def f3():
"""
The string below is prepared so that ctags with the bug does not start a
new triple string. For a clean precondition for the next test.
''"""
print "f3"
# normal string immediately after a normal string not detected
''" import os\
"
""' def fX():\
'
# format=tagmanager
f116()0
f216()0
f316()0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment