Claude
65187930bd
Update tokenizer to adhere to PEP492 magic
2016-02-09 21:07:18 +01:00
Dave Halter
f9a64fd637
Fix some issues in Python 2.7
2016-01-26 14:59:40 -02:00
Dave Halter
beeffd2dcd
Some pgen2 tests were always skipped.
2016-01-07 18:55:10 +01:00
Dave Halter
2a691eefff
Including pgen2 tests from the cpython repo.
2015-12-26 03:15:09 +01:00
Dave Halter
eb2e41f771
Grammar versioning has now a smoother interface.
2015-12-25 19:30:25 +01:00
Dave Halter
c4906e0e3f
Rework the parser so we can use arbitrary start nodes of the syntax.
...
This also includes a rework for error recovery in the parser. This is now just possible for file_input parsing, which means for full files.
Includes also a refactoring of the tokenizer. No more do we have to add an additional newline, because it now works correctly (removes certain confusion.
2015-12-20 22:25:41 +01:00
Claude
c61f39cb2b
add test for annotations to test_parser_tree
2015-12-13 23:45:37 +01:00
Kevin Kelley
9ff7f99bac
Add test cases demonstrating the issues with parser.tree.Lambda.
2015-10-24 23:34:06 +00:00
Dave Halter
66557903ae
\\\r\n is as possible as \\\n.
2015-04-28 18:53:14 +02:00
Dave Halter
b6f635b88b
Python 2.7 io.StringIO always needs unicode input.
2015-04-28 02:05:38 +02:00
Dave Halter
b6ebb2f8bf
Fixed issues with last positions in the tokenizer, which was messed up a little bit a few commits ago.
2015-04-27 21:42:40 +02:00
Dave Halter
0a96083fde
Fix ur'' literals.
2015-04-27 19:21:41 +02:00
Dave Halter
902482568e
The tokenize endmarker should really be the maximum position possible. Caused matplotlib to fail. Fixes davidhalter/jedi-vim#377 .
2015-04-27 19:01:45 +02:00
Dave Halter
7af5c23874
Cache bug fixes.
2015-04-22 03:01:32 +02:00
Dave Halter
8fca3f78a1
Add a py__name__ call to modules. This makes listing the qualified names of modules possible (in combination with the module_name_cache). Fixes #519 .
2015-04-14 17:36:20 +02:00
Dave Halter
9149c5adc2
Python 3.2 tests didn't work because a u string literal was used.
2015-03-31 14:42:26 +02:00
Dave Halter
72fd190149
unicode strings should not raise an error if used in repr.
...
Python 2 doesn't allow unicode objects in __repr__ methods. Therefore we need to encode them as utf-8 bytes.
2015-03-25 23:42:52 +01:00
Dave Halter
0de5a0f412
Python 2 allows tuple unpacking in parameter definitions. Jedi just ignores such constructs, since they are really rare and not the future.
2015-03-24 15:02:07 +01:00
Dave Halter
e296b00201
Change the tests of @hamatov a small bit. They are now working with the new parser.
2015-03-06 13:10:59 +01:00
Dave Halter
2cddfd656b
Merge branch 'unicode_tokenize_fix2' of https://github.com/hatamov/jedi into dev
2015-03-06 11:44:03 +01:00
farhad
32081bd156
Merge branch 'dev' into unicode_tokenize_fix2
...
Conflicts:
AUTHORS.txt
2015-03-06 12:14:38 +04:00
farhad
80719fc821
added test for quoted strings parsing
2015-03-06 11:54:01 +04:00
Dave Halter
910f2e6486
Use textwrap.dedent for better readability of the testing code.
2015-03-06 01:49:57 +01:00
Dave Halter
fd1be02f1e
Test for unicode tokens in Python 2.7.
2015-03-06 01:47:37 +01:00
Dave Halter
a0f8b58e71
Fix a Python 2.7 compatibility issue.
2015-03-06 00:37:41 +01:00
Dave Halter
e698e6aeeb
Rework some of the analysis statement gathering.
2015-03-05 13:36:41 +01:00
Dave Halter
aebeafccc4
Rewrite last newlines in the fast parser to get correct get_code outputs even with the fast parser.
2015-02-23 13:36:43 +01:00
Dave Halter
2fcb1b9b65
Fast parser fix.
2015-02-23 01:00:17 +01:00
Dave Halter
3ec96b25cc
Issue with backslashes again in the fast parser.
2015-02-21 18:07:21 +01:00
Dave Halter
0b5a509e83
Small correction: mixed up a re.match and re.search.
2015-02-20 00:48:05 +01:00
Dave Halter
ce96af5e04
Fix an issue with open parentheses and function definitions right after. The fast parser should behave like the normal one and just ignore the open brackets.
2015-02-19 11:02:11 +01:00
Dave Halter
0e73bf7d80
Account for code parts that were not parsed in the fast parser.
2015-02-19 01:42:13 +01:00
Dave Halter
39bf9f426b
Handle backslash escaping.
2015-02-18 17:32:34 +01:00
Dave Halter
595da50ab8
The fast parser splitting now also checks for parentheses levels, because without that, sometimes we split in very strange positions, while ignoring others.
2015-02-18 13:49:03 +01:00
Dave Halter
38e26892f2
The fast parser doesn't work with open parentheses properly, document that.
2015-02-18 12:50:26 +01:00
Dave Halter
cefd76e5d1
Testing open parentheses in the fast parser.
2015-02-17 17:26:00 +01:00
Dave Halter
506d602795
Fix multi line param issues in the fast parser.
2015-02-17 15:24:49 +01:00
Dave Halter
7663703989
Fix issues with multi line for loops in the fast parser.
2015-02-17 14:57:00 +01:00
Dave Halter
e1c28d2c3f
variables starting with 'class' and 'def' should not slow down the parser, changed the check to 'class ' and 'def '.
2015-02-16 10:08:22 +01:00
Dave Halter
3680784234
Add another for in one line test for the fast parser.
2015-02-15 20:28:59 +01:00
Dave Halter
a3b32729a7
Test for an issue with for loops and a statement on the same line. (fast parser)
2015-02-14 16:27:04 +01:00
Dave Halter
07156b427c
Fix some compatibilty issues in the test suite for Python 2.7.
2015-02-09 14:15:25 +01:00
Dave Halter
2d9c644ab6
Fixed some minor mocking differences in Python 2 and 3.
2015-02-05 01:25:53 +01:00
Dave Halter
b57ee880af
Remove assertEqual from tokenize tests, we can do it with just assert, py.test converts all of that automatically.
2015-02-05 00:48:40 +01:00
Dave Halter
c6b818c504
Changed a tokenize test to match the current intended behavior of the tokenizer.
2015-02-05 00:43:25 +01:00
Dave Halter
dce952aec6
Fix an issue with omited dedents in the parser.
2015-02-05 00:11:12 +01:00
Dave Halter
66dfa59286
Fix some endmarker prefix issues in the fast parser.
2015-02-03 22:09:55 +01:00
Dave Halter
6cdfecb541
Fix a number of issues in the fast parser around functions with only one statement (no suite) and wrong indentations).
2015-02-02 15:03:57 +01:00
Dave Halter
e913872192
Merged the tokenize is_identifier changes.
2015-02-01 20:32:01 +01:00
Dave Halter
bc118e8047
Simplify the fast parser tokenizer more. Now it is more readable and less buggy (+bugfixes).
2015-01-31 20:09:44 +01:00