Commit Graph

788 Commits

Author SHA1 Message Date
R. Tyler Croy f039977edb Add a BUILDING document to make sure it's clear how to build this tool 2014-01-19 12:14:52 -08:00
R. Tyler Croy 909fab0297 Add some markdown extensions to files for easy viewing on github 2014-01-19 12:10:40 -08:00
R. Tyler Croy 75a50140a1 Merge Ada support from the GNU Ada Source Forge project
<http://sourceforge.net/p/gnuada/> see tools/ctags
2014-01-19 12:08:56 -08:00
perlguy0 6f1f16c3ca Fixed a bug in the way package names are parsed.
If package keyword and the package names were on separate lines, the
parser would read past the end of the line.


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@807 c5d04d22-be80-434c-894e-aa346cc9e8e8
2013-12-16 05:50:55 +00:00
perlguy0 1634a5f44a Optimized function identifying Perl POD words.
This function no longer allocates memory and no unnecessary comparisons
are performed.


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@806 c5d04d22-be80-434c-894e-aa346cc9e8e8
2013-12-16 05:41:05 +00:00
perlguy0 42936f99da Support Perl constants declared via a hash reference.
Parse constants declared via hash reference, like this:
    use constant {
        A => 1,
        B => 2,
    };
The approach we take is simplistic, but it covers the vast majority of
cases well.


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@805 c5d04d22-be80-434c-894e-aa346cc9e8e8
2013-12-16 04:47:48 +00:00
dfishburn 24e68a6b54 Removed assignment no longer required
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@804 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-12-16 00:55:22 +00:00
dfishburn 2ed09469d4 Removed BOM from file and changed encoding to latin1
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@803 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-12-16 00:42:57 +00:00
dfishburn 33944f5128 Removed duplicate test case
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@802 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-12-16 00:41:30 +00:00
dfishburn cbbf9571a7 Added additional test files
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@801 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-12-04 02:42:48 +00:00
dfishburn 82b85e13c3 Updated additional changes to jscript.c and test files from Columban.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@800 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-12-04 02:29:08 +00:00
dfishburn ad31b5c30d Fixed compiler warnings
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@799 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-11-07 03:10:12 +00:00
dfishburn 9943728938 Parsing javascript quotes like this:
"('adding '+a+' and ' +b);\    // separate string using "\"

Starts with a " and has a " at the end of the line, though that is part of a
comment and I assume the \ after the ; means it is a line continuation
indicator and the rest of the line should be ignored.  So, I have updated
parseString() to do just that.     

This correctly parses:
    Test\jsFunc_tutorial.js


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@798 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-11-07 03:06:10 +00:00
dfishburn 00e6482df8 Another of changes to the Javascript parser courtesy of Columban Wendling.
Fix a questionable use of the "const" type qualifier resulting
        mostly in improper lines numbers with some parsers (seen in the
        JavaScript parser).  Details in the patch, but basically the
        compilers may "improperly" optimize the content of the File
        global (seen with GCC and CLang when optimizing).


        Set the tag's scope rather than including it in the tag name.
        (Geany bug #3570192 [3])


        Just an optimization actually -- but also somewhat works around
        what 0002 above properly fixes: less calls means less room for
        the values to be improperly cached.

        
        Patch from an user, fixes generation of function tags inside
        methods.  (Geany bug #3571233 [4]).

        Fix for unbraced if/else, and adds more tests to 1880687.js
        (Geany bug #3568542 [5]).

        Just to make the parseJfFile() code a little simpler.

        Fix findCmdTerm() when it encounters an open curly.

        Fix some more unterminated statements problems, still in
        1880687.js.

        Lowercase "object" isn't actually a JavaScript keyword.
        (Geany bug #3036476 [6])

        Properly handle properties values.
        (Geany bug #3470609 [7])

        Generate class tag for variables for which we generated
        children tags.

	This one includes the tests for
	0005-JavaScript-Fix-recognizing-functions-inside-methods.patch
	and also fixes the scope of the tags this patch added -- proof
	that writing test cases is indeed better than simply testing
	against existing code :)


NOTE: This following tests are broken with these changes.
    Test\jsFunc_tutorial.js
         D4 function breaks the parser.

    Test\simple.js
        var invalidInnerFunction = function(a,b) {}
        A function tag was generated for this tag.

        Actually there are quite a few differences with
        simple.js, I am not certain whether the changes
        are correct or not.  My javascript knowledge is 
        not that complete.




git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@797 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-11-07 01:40:08 +00:00
dfishburn 3d8fff34b0 Missed a call to vStringDelete in makeJsTag.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@796 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-11-06 02:38:34 +00:00
vberthoux f5d7a3847b Handling let rec .. = ... and ... declarations at top level.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@795 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-10-25 20:19:48 +00:00
dfishburn 446c19b690 Removed following warning.
jscript.c: In function ‘parseStatement’:
jscript.c:1053:10: warning: variable ‘is_prototype’ set but not used [-Wunused-but-set-variable]


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@794 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-10-24 02:15:55 +00:00
dfishburn b3c09e63ed Changed the javascript parser to set the tag's scope rather than including it in the tag name.
Patch from Colomban.



git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@793 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-10-24 01:46:52 +00:00
dfishburn 23a17ad155 There is no need to set the token position information in the loop
searching for the initial token character, simply do that when we
finally found the token start.

Just an optimization actually -- but less calls means less room for
the values to be improperly cached.

Patch from Colomban.



git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@792 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-10-24 01:25:30 +00:00
dfishburn e23093345c Changed the javascript parser to set the tag's scope rather than including it in the tag name.
Patch from Colomban.



git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@791 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-10-24 01:13:13 +00:00
dfishburn 8b48350d16 Added 3548393.vim which was the source file for the trunk crash which I
could not reproduce and I do not have valgrind.


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@790 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-10-23 23:30:50 +00:00
elias 747395e852 Applied a patch (with minor modification) by Jan Larres to not include tab characters in the signature of Python functions.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@789 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-09-17 22:19:32 +00:00
vberthoux 98a8c332ef Fix variable initialisation problem in objc parser, causing erroneous
parsing of second file.

Patch sent by Lars C. Hassing

git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@788 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-09-17 13:48:26 +00:00
dfishburn 8c3b2e6ab9 Fixed up compiler warnings
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@787 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-06-20 14:50:22 +00:00
dfishburn 4d616d854f Most Vim files have a .vim extension.
A new deployment archive format was created with a .vba extension.
These are Vimball Archives and must be parsed differently from
regular Vim files.

They follow this format:
    " Vimball Archiver comment
    UseVimball
    finish
    filename
    line count (n) for filename
    (n) lines
    filename
    line count (n) for filename
    (n) lines
    ...

Parsing is easy, look for UseVimBall as the first line of uncommented code.
Grab the filename, followed by the # of lines, skip those lines and 
look for the next filename.

Added a new Kind for these files:
	{ TRUE,  'n', "filename", "vimball filename" },

So the full list is:
    Vim
        a  autocommand groups
        c  user-defined commands
        f  function definitions
        m  maps
        v  variable definitions
        n  vimball filename

David Fishburn



git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@786 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-06-20 14:43:02 +00:00
dfishburn ceabb9f058 I made some improvements to the LaTeX parser to make it more useful
since the current support is a bit lacking. In particular:

- Colons are now allowed in identifiers; this is a common way of
  separating parts in a label.
- LaTeX doesn't have a concept of strings like other languages, so
  quotes shouldn't be handled specially, otherwise this can lead to
  whole passages of text being ignored. This fixes bug #2886871.
- Sectioning commands now report the scope they're in, for example a
  subsection will report the section it's in using a 'section:'
  extension field. This allows for example the Tagbar Vim plugin to
  display the sections in a properly nested way.
  At the moment the scopes are separated by two double quotes ('""')
  as that is a character sequence that shouldn't really appear in
  normal LaTeX text, but if anyone has a better idea please tell me.
- Labels can now be output as an additional kind. They're not listed
  in their respective scopes as that seems to be what other editors
  do, too, and I think it makes more sense this way.

It's working fine for me (and another guy who tested it together with my
Tagbar plugin), but it's still possible that I overlooked something --
if so please tell me.

Cheers,
Jan Larres


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@785 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-05-05 03:05:24 +00:00
elias fab3cf8a81 Jan Larres enabled function signatures for the Python parser.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@784 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-04-14 17:33:11 +00:00
dhiebert 37aee7a05d Replaced calls to strcpy() with memmove() where the strings overlapped, for which case the behavior of strcpy() is undefined.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@783 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-03-26 02:38:11 +00:00
dhiebert d19a142f09 Replaced calls to strcpy() with memmove() where the strings overlapped, for
which case the behavior of strcpy() is undefined.


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@782 c5d04d22-be80-434c-894e-aa346cc9e8e8
2012-03-26 02:35:57 +00:00
dhiebert 548f42754d Fixed problem detecting function definitions using circumflexes used for managed classes under MS.NET.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@781 c5d04d22-be80-434c-894e-aa346cc9e8e8
2011-12-10 22:50:20 +00:00
dhiebert 281d7e89e9 Fixed problem detecting function definitions using circumflexes used for managed classes under MS.NET.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@780 c5d04d22-be80-434c-894e-aa346cc9e8e8
2011-12-10 22:48:25 +00:00
dhiebert 27c665604b Resolved compiler warnings
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@779 c5d04d22-be80-434c-894e-aa346cc9e8e8
2011-12-10 22:44:14 +00:00
elias f768e27166 [python] Fixed bug #2075402: Multiline-strings inside comments were not ignored.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@778 c5d04d22-be80-434c-894e-aa346cc9e8e8
2011-06-15 19:09:52 +00:00
elias e04cb6554c [python] Synched revision 5821 of geany/tagmanager:
When checking for literal strings to ignore, consider also unicode, binary and raw strings.


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@777 c5d04d22-be80-434c-894e-aa346cc9e8e8
2011-06-15 18:38:52 +00:00
elias ef27df94de [python] Synched revision 4768 from geany/tagmanager:
Apply patch from Colomban Wendling to parse Python lambda functions
(thanks) - modified to only parse toplevel or class member lambdas.


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@776 c5d04d22-be80-434c-894e-aa346cc9e8e8
2011-06-15 18:23:33 +00:00
elias 4b2166745c fixed bug #3168705
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@775 c5d04d22-be80-434c-894e-aa346cc9e8e8
2011-06-15 16:02:55 +00:00
vberthoux ece244f54e Fixing bug of comment inside string in OCaml
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@774 c5d04d22-be80-434c-894e-aa346cc9e8e8
2010-11-30 13:38:34 +00:00
vberthoux 9b80771e38 Bugifx : nested ocaml comment, patch of Radu GRIGORE
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@773 c5d04d22-be80-434c-894e-aa346cc9e8e8
2010-11-30 13:20:51 +00:00
vberthoux 9e830a8e04 commiting Radu GRIGORE patch
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@772 c5d04d22-be80-434c-894e-aa346cc9e8e8
2010-11-30 13:15:25 +00:00
vberthoux 591f347d7e Objective C parser
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@771 c5d04d22-be80-434c-894e-aa346cc9e8e8
2010-11-30 13:15:12 +00:00
vberthoux 8ec7bb892a Ocaml bug fixes
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@770 c5d04d22-be80-434c-894e-aa346cc9e8e8
2010-09-13 07:10:28 +00:00
dhiebert 2d7762e94a Removed unused structure member.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@769 c5d04d22-be80-434c-894e-aa346cc9e8e8
2010-09-11 21:00:16 +00:00
dhiebert 7626d9de2a Change for modern versions of Vim.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@768 c5d04d22-be80-434c-894e-aa346cc9e8e8
2010-09-11 19:53:20 +00:00
dhiebert d962ac6cbf Removed duplicate information that is out-of-sync with similar information contained elsewhere.
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@767 c5d04d22-be80-434c-894e-aa346cc9e8e8
2010-09-11 19:05:26 +00:00
dhiebert 02abf6e258 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
2010-09-11 18:59:45 +00:00
jafl 0c703a48eb Ticket: 3062068
update NEWS


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@765 c5d04d22-be80-434c-894e-aa346cc9e8e8
2010-09-08 20:19:52 +00:00
jafl cda748e262 Ticket: 3062068
turn on LFS support


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@764 c5d04d22-be80-434c-894e-aa346cc9e8e8
2010-09-08 20:18:47 +00:00
dfishburn 68e2b76101 JavaScript Parser updates for bug 2777310.
var x = 1;
var y = [];
var z = {};

Only x and y are detected - z is ignored,
despite this being perfectly valid syntax
(and quite common, when initialising
a variable for use as a hash table).

[It's equivalent to z = new Object(), in a
similar fashion to y = [] being equivalent
to y = new Array() ].

As far as I can tell, the cause seems to be that
object literals are not being considered as valid
for the right hand side of an assignment.

Now, global variables for z is generated for the release after 5.8.



git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@763 c5d04d22-be80-434c-894e-aa346cc9e8e8
2010-07-28 14:22:42 +00:00
dfishburn 83e1820062 VIM Parser updates for bug 3032253.
Vim parser did not handle an invalid 'command' format and hung".
Now it handles and checks for these formats:
   command.
   command!.
   comma!.
   comma! ThisIsValid


git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@762 c5d04d22-be80-434c-894e-aa346cc9e8e8
2010-07-28 11:38:19 +00:00
dfishburn 410c03a895 fixed comment style
git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@761 c5d04d22-be80-434c-894e-aa346cc9e8e8
2010-06-04 12:40:28 +00:00