Colomban Wendling
9c84a91bb3
javascript: Fix scope inside nested blocks (if/else/while/for/etc.)
2014-11-24 02:45:22 +01:00
Colomban Wendling
7e6215661e
javascript: Fix handling some class-related unterminated statements
2014-11-24 02:43:29 +01:00
Colomban Wendling
5a1a22d930
javascript: Properly handle nested unknown blocks
...
Properly match open curly braces when parsing a statement not to
possibly get fooled by unexpected nested blocks, e.g. after a
`switch`'s `case` or a label.
This mostly reverts c54c3ad5e815d16e3b48f3c477465627808aadee and
replaces it with a more correct and complete solution.
2014-11-24 02:41:57 +01:00
Colomban Wendling
f158f5d362
javascript: Fix scope after some constructs
2014-11-24 02:41:17 +01:00
dfishburn
c54c3ad5e8
Added new method findMatchingToken() to skip over blocks of code. Updated parseSwitch() to use the new method.
...
Updated tests/ctags/ui5.ui.controller.js with code that broke the switch statement.
git-svn-id: https://svn.code.sf.net/p/ctags/code/trunk@809 c5d04d22-be80-434c-894e-aa346cc9e8e8
2014-11-24 01:48:04 +01:00
dfishburn
52d2d73527
Udated jscript to be able to parse SAPUI5 controller and view files.
...
Added test case tests/ctags/ui5.controller.js
git-svn-id: https://svn.code.sf.net/p/ctags/code/trunk@808 c5d04d22-be80-434c-894e-aa346cc9e8e8
2014-11-24 01:39:36 +01:00
Colomban Wendling
f765463af0
Import new CSS parser from fishman-ctags
...
Some highlights:
* Fixes handling of comments
* Adds support for attribute and namespace selectors
* Adds support for @supports blocks
* Fixes tag type for many selectors
* Adds support for pseudo-classes with arguments
2014-11-11 02:01:41 +01:00
Colomban Wendling
2072797283
Import CSS test cases from fishman-ctags
2014-11-11 01:59:12 +01:00
Colomban Wendling
0ed236db30
TM: Fix some test results after sort changes from 90944c77
2014-11-08 18:13:13 +01:00
Colomban Wendling
72897bac7d
Add a Txt2tags test case for titles
...
This is simply extracted from the rules.t2t test, but with unique title
content as the tagmanager removes duplicate tags in tags files.
2014-08-19 16:46:20 +02:00
Colomban Wendling
a1466f656f
Add a Txt2tags test case
...
From the official docs:
https://txt2tags.googlecode.com/svn/trunk/samples/sample.t2t
2014-08-19 16:34:21 +02:00
Colomban Wendling
e587038dea
Add a Txt2tags test case
...
From the official docs:
https://txt2tags.googlecode.com/svn/trunk/doc/English/rules.t2t
2014-08-19 16:24:48 +02:00
Colomban Wendling
8341228ffa
JavaScript: fix handling of parentheses around an rvalue
...
Properly skip parentheses around an rvalue, and then properly recognize
the surrounded value. This allows to properly recognize e.g. rvalue
`({...})` as an object, or `(function(){})` as a function. As the
implementation is tolerant regarding garbage after the statement,
function expressions called straight away (`(function(){})()`) are
implicitly supported.
This however removes support for the following invalid JavaScript
syntax that was previously supported as a function/method declaration:
var func = () {}
This syntax is not present in the ECMA standard nor is supported by
popular JavaScript engines.
See:
* http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
section 13, "Function Definition"
* http://ecma262-5.com/ELS5_HTML.htm#Section_13
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope#Defining_functions
2014-08-04 00:23:13 +02:00
Colomban Wendling
35e8fbbe28
JavaScript: fix handling of various missing semicolons in loops
2014-08-03 23:24:33 +02:00
Colomban Wendling
3ff01aeeb3
JavaScript: recognize assignation to a parenthesized expression
2014-08-03 19:07:59 +02:00
Colomban Wendling
b596aa14e8
JavaScript: don't choke when returning object literals
2014-08-03 16:57:26 +02:00
Colomban Wendling
bc9b2fa444
JavaScript: don't choke on array lists
2014-08-03 16:52:11 +02:00
SiegeLord
58f0a20bcc
Rust: Update test sources to be valid Rust code.
2014-07-29 11:20:56 -04:00
SiegeLord
d9e569398a
Rust: Add new comment handling test.
2014-07-29 11:14:34 -04:00
SiegeLord
cf9385c6d4
Rust: Add test for character literals.
2014-07-29 10:55:15 -04:00
SiegeLord
fba9d19ec7
Rust: Add a test for the new string lexer.
2014-07-29 09:34:04 -04:00
Colomban Wendling
4e0193d8f1
Zephir: add some tag parser tests
2014-05-15 18:08:25 +02:00
Colomban Wendling
d8aaa59f9a
Python: fix parsing of variables assigned to triple quoted strings
...
Fixes #262 .
2014-05-12 21:52:03 +02:00
Colomban Wendling
1514993a6a
Fix generating distcheck on clean sources
...
There is no point in runner.sh depending on the generated Geany
executable, and this breaks running `make distcheck` before building
the sources, as the Geany executable doesn't exist yet.
2014-04-13 18:07:17 +02:00
SiegeLord
e4c6aa3d9c
Rust: Add a test for leading 'priv'.
2014-04-02 13:42:30 -04:00
SiegeLord
e89c4af47c
Rust: Add some more syntax examples to the CTags test file.
...
Also, made it compile again.
2014-04-02 13:05:57 -04:00
SiegeLord
2a80759a3a
Rust: Update ctags tests.
...
Also, make them compile again with the Rust compiler.
2014-04-01 21:37:03 -04:00
Adam Hirst
5965b5ebd3
Fortran: add a few more test cases
2014-02-23 20:16:29 +01:00
Colomban Wendling
d8954bbf67
Fortran: add support for "len" and "kind" qualifiers
...
Test cases contributed by Adam Hirst, thanks.
2014-02-23 20:13:36 +01:00
Colomban Wendling
ed1dc50062
Fortran: allow keywords as names
...
Allow keywords for names of modules, programs, types, interfaces,
structures and enums.
Test case contributed by Adam Hirst, thanks.
2014-02-23 20:11:00 +01:00
Colomban Wendling
e47d45eb28
Fortran: fix handling of preprocessor directives on the first line
...
Fix a race initialization leading to incorrect handling of preprocessor
directives on the first input line.
Test case contributed by Adam Hirst, thanks.
2014-02-23 20:10:35 +01:00
Colomban Wendling
ef4c72501e
Fortran: generate fake tags for anonymous structures, interfaces and enums
...
This allows both to show those anonymous elements, as well as giving a
parent to their children, fixing display in the symbols tree.
2014-02-23 20:02:55 +01:00
Colomban Wendling
9520e7f7d7
Fortran: parse Fortran 2003 enums
...
Allow for not-yet-standard enum naming using `:: name` syntax, see
http://docs.cray.com/books/S-3692-51/html-S-3692-51/z970507905n9123.html
Test cases contributed by Adam Hirst, thanks.
2014-02-23 20:01:30 +01:00
Colomban Wendling
329b2cb401
Fortran: don't generate tags for interface content
2014-02-23 19:38:34 +01:00
Colomban Wendling
5a67a4f64c
Fortran: report interfaces
2014-02-18 19:33:39 +01:00
Colomban Wendling
29336ffed0
Fortran: display components
2014-02-18 19:11:47 +01:00
Colomban Wendling
362a5cc654
Fortran: properly report scope for programs, subroutines and types
...
To do this we change the internal types to only use types matched by
symbols_get_current_scope(). This is a bit of a hack, but the tag
types were already questionable and simply mapped to ones the
TagManager know.
This however merges Functions and Subroutines under the same top-level
item in the symbol list.
2014-02-18 19:04:37 +01:00
Colomban Wendling
7d76063282
Fortran: fix handling of pointer association operator
...
Test case contributed by Adam Hirst, thanks.
Closes #1030 .
2014-02-17 23:17:35 +01:00
Adam Hirst
1c0fa99e1d
Support F2003 array syntax and F2008 coarrays
...
Fortran 2003 allows '[' and ']' as array constructors in addition to
the legacy '(/' and '/)'. Fortran 2008 allows '[]' as part of a
CODIMENSION specifier, which can either be `codimension[]` in
the type-spec; or as either `variable[]` or `variable()[]` in
the entry-spec.
Credit to Colomban Wendling for the skipOverSquares logic, and
treating `codimension` as a special-case.
Last part of bug #1023 .
2014-02-15 15:48:31 +01:00
Colomban Wendling
497bfaed46
Fortran: fix line continuation inside comments
...
Fix improperly handling '&' at the end of the first comment line after
a non-comment line as a line continuation.
Part of bug #1023 .
2014-02-15 00:33:05 +01:00
Adam Hirst
e1b115ee52
Added tests for the inclusion of ASSOCIATE in the tag manager
2014-02-14 19:31:08 +01:00
Enrico Tröger
09c2315bc4
Change expected tag kind for Python imports in tests since the parser has changed
...
This fixes the tests which failed because I changed the parsing yesterday to
classify Python as externvars and not as namespace tags anymore.
2014-02-09 09:26:36 +01:00
Colomban Wendling
d40932ce4d
C++: mitigate matching error on generics containing an expression
...
Mitigate parse error with generics like `foo<X<Y> x;` by avoiding
matching past a semicolon (";") or open curly brace ("{"), which
can't be part of the generic. This isn't a proper fix, but mitigates
the impact of such constructs.
2014-01-23 14:17:43 +01:00
SiegeLord
416c3daecc
Clean up Rust ctag tests and make them more comprehensive
2014-01-14 12:50:38 -05:00
Colomban Wendling
370666865b
Add Rust tests to the makefile
2014-01-14 12:50:38 -05:00
dobkeratops
09cb24c7c7
Add Rust ctag tests
2014-01-14 12:50:38 -05:00
Colomban Wendling
a7884ee2f8
JavaScript: fix parsing of files starting with a shebang
...
Closes #1016 .
2013-12-24 19:30:04 +01:00
Enrico Tröger
48fe855b50
Adjust test case tags file for fixed Python parser (class arglist assignment)
2013-10-13 18:55:16 +02:00
Enrico Tröger
3443e288fe
Add flag to tm_tags_find() to indicate the tags array may not be sorted
...
tm_tags_find() relies on a sorted tags array to be passed in but in
tm_source_file_set_tag_arglist() we don't have a sorted array yet and
sorting it on demand seems more heavy than the alternative:
make tm_tags_find() search the array linear if the new flag is set.
This fixes a bug in the Python parser when assigning the argument list
of __init__() methods to their class' argument list which annoyed me
for years already.
Also add a test case for this.
2013-10-13 18:52:56 +02:00
Colomban Wendling
32b971cf1c
JavaScript: fix parsing of regular expressions in a return statement
2013-09-23 16:52:55 +02:00