Fixef bad tag when parsing empty OCaml file, reported by Marc Weber.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@766 c5d04d22-be80-434c-894e-aa346cc9e8e8
This commit is contained in:
parent
0c703a48eb
commit
02abf6e258
3
NEWS
3
NEWS
|
@ -1,12 +1,13 @@
|
|||
Current Version: @VERSION@
|
||||
|
||||
ctags-@VERSION@ (@DATE@)
|
||||
* Added support for new "detachable" keyword [Eiffel].
|
||||
* Added support for new "attached" and "detachable" keywords [Eiffel].
|
||||
* Fixed parsing of comments after import statements and other tags, contributed by Huandari Lopez to Geany [Python].
|
||||
* Fixed PHP parser to ignore keywords inside comments [PHP, Bug #1795926].
|
||||
* Fixed regular expressions for Ant so they won't span multiple tags [Ant].
|
||||
* Fixed infinite loop with malformed Makefiles, contributed by Martin Dorey [Make, Bug #2959889].
|
||||
* Fixed Verilog parameter parsing, contributed by Nicolas Vincent [Verilog, Patch #2747828].
|
||||
* Fixed error when parsing empty file [OCaml].
|
||||
* Enabled Large File System support. [Bug #3062068]
|
||||
|
||||
ctags-5.8 (09 Jul 2009)
|
||||
|
|
2
entry.c
2
entry.c
|
@ -772,6 +772,8 @@ static int writePatternEntry (const tagEntryInfo *const tag)
|
|||
boolean newlineTerminated;
|
||||
int length = 0;
|
||||
|
||||
if (line == NULL)
|
||||
error (FATAL, "bad tag in %s", vStringValue (File.name));
|
||||
if (tag->truncateLine)
|
||||
truncateTagLine (line, tag->name, FALSE);
|
||||
newlineTerminated = (boolean) (line [strlen (line) - 1] == '\n');
|
||||
|
|
16
ocaml.c
16
ocaml.c
|
@ -866,6 +866,11 @@ static void prepareTag (tagEntryInfo * tag, vString const *name, ocamlKind kind)
|
|||
tag->kindName = OcamlKinds[kind].name;
|
||||
tag->kind = OcamlKinds[kind].letter;
|
||||
|
||||
if (kind == K_MODULE)
|
||||
{
|
||||
tag->lineNumberEntry = TRUE;
|
||||
tag->lineNumber = 1;
|
||||
}
|
||||
parentIndex = getLastNamedIndex ();
|
||||
if (parentIndex >= 0)
|
||||
{
|
||||
|
@ -880,9 +885,12 @@ static void prepareTag (tagEntryInfo * tag, vString const *name, ocamlKind kind)
|
|||
* more information to it in the future */
|
||||
static void addTag (vString * const ident, int kind)
|
||||
{
|
||||
tagEntryInfo toCreate;
|
||||
prepareTag (&toCreate, ident, kind);
|
||||
makeTagEntry (&toCreate);
|
||||
if (OcamlKinds [kind].enabled && ident != NULL && vStringLength (ident) > 0)
|
||||
{
|
||||
tagEntryInfo toCreate;
|
||||
prepareTag (&toCreate, ident, kind);
|
||||
makeTagEntry (&toCreate);
|
||||
}
|
||||
}
|
||||
|
||||
boolean needStrongPoping = FALSE;
|
||||
|
@ -1769,7 +1777,7 @@ static void computeModuleName ( void )
|
|||
if (isLowerAlpha (moduleName->buffer[0]))
|
||||
moduleName->buffer[0] += ('A' - 'a');
|
||||
|
||||
makeSimpleTag (moduleName, OcamlKinds, K_MODULE);
|
||||
addTag (moduleName, K_MODULE);
|
||||
vStringDelete (moduleName);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue