Commit Graph

134 Commits

Author SHA1 Message Date
Dave Halter
e5f09e1c7d Fix an issue with end_pos of a module. 2016-07-08 00:03:52 +02:00
Dave Halter
c499696b60 Fix python 2.7 tests. 2016-07-07 19:16:01 +02:00
Dave Halter
adcc1c2b51 Don't delete ErrorNode names. They are part of the parser now.
Fixes #594 and possibly also #590 and #579.
2016-07-07 18:33:45 +02:00
Dave Halter
4243adf54b Add param splitting test. 2016-07-06 08:30:27 +02:00
Dave Halter
074a154af3 Fix a small issue that coul dhappen e.g. in stdin. 2016-07-06 08:05:50 +02:00
Dave Halter
10b8936b11 More python2.7 fixes. 2016-07-03 02:57:43 +02:00
Dave Halter
52c42c3392 Reenable call signature caching and move a lot of parser specific caching to the parser itself. 2016-06-28 08:46:29 +02:00
Dave Halter
969100e471 Move the parsing away from user_context to api.py. 2016-06-27 08:48:36 +02:00
Dave Halter
0445d51d34 Remove the user_scope from the user_context module. 2016-06-27 08:35:24 +02:00
Dave Halter
73e71b3c1a Finally able to remove the user_context. This is awesome!
Now we only use the syntax tree to understand where the user is doing something.
2016-06-23 16:26:28 +02:00
Dave Halter
27f05de3b7 Fix a few more issues, mostly with the fast parser. 2016-06-13 18:21:17 +02:00
Dave Halter
82c76fa689 Merge with the linter branch (especially the changes of pep484. 2016-06-07 13:51:25 +02:00
Dave Halter
4ec72d8f24 Finally fix the last remaining fast parser issue. 2016-06-06 08:55:10 +02:00
Dave Halter
436f7dffe0 Fix another very annoying fast parser issue. 2016-06-06 08:37:40 +02:00
Dave Halter
dd85fc6ffd Add error token in a normal way to the syntax tree as ErrorLeaf. 2016-06-05 14:49:57 +02:00
Dave Halter
aa97e4e714 Fix the fast parser issue #589. 2016-06-05 14:42:32 +02:00
Dave Halter
12f878a4f7 Test for the issue #589. 2016-06-04 01:06:13 +02:00
Dave Halter
c3ffaab8af The fast parser had some splitting issues. 2016-06-04 00:50:36 +02:00
Dave Halter
0c7894b3e6 Fix a few fast parser tests. 2016-06-02 08:24:52 +02:00
Claude
d5f08f8bdd opting for skipping PEP492 backwards compatibility magic, instead directly making await and async keywords
See discussion at
https://github.com/davidhalter/jedi/pull/691#issuecomment-182815864
2016-02-11 19:30:01 +01:00
Claude
7077d0b762 Using python 3.7-like parser, instead of python 3.5 magic.
See https://github.com/davidhalter/jedi/pull/691#issuecomment-182815864
Revert "Update tokenizer to adhere to PEP492 magic"

This reverts commit 65187930bd.
2016-02-11 19:14:31 +01:00
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