Commit Graph

48 Commits

Author SHA1 Message Date
Dave Halter
f8b5aab6f4 Move some parser tests. 2017-05-15 13:57:26 -04:00
Dave Halter
ab71c943ee Move a parser test to the correct place. 2017-05-07 16:29:48 +02:00
Dave Halter
6e9911daa3 Scope.imports -> iter_imports. 2017-04-30 02:31:30 +02:00
Dave Halter
b4039872bd Replace Scope.subscopes with iter_funcdefs and iter_classdefs. 2017-04-30 01:36:17 +02:00
Dave Halter
eaa5100372 Removed Scope.statements from the parser tree. 2017-04-28 18:18:58 +02:00
Dave Halter
b4631d6dd4 Progress in removing the docstring/call signature logic from the parser. 2017-04-18 18:48:05 +02:00
Dave Halter
deb028c3fb Move get_statement_of_position out of the parser tree. 2017-04-15 02:23:08 +02:00
Dave Halter
4bd3c91622 Fix Python 2 tests. 2017-04-15 01:49:20 +02:00
Dave Halter
d6d25db9a2 Remove __str__ from name. 2017-04-12 23:06:11 +02:00
Dave Halter
7ecaf19b59 Fix _remove_last_newline. Fixes #863. 2017-04-02 21:29:48 +02:00
Dave Halter
8a35a04439 Remove the module path from the parser tree.
Some static analysis tests are still failing.
2017-03-27 18:13:32 +02:00
Dave Halter
63cafeaa87 Remove all usages of start_parsing=True in the fast parser. 2017-03-26 12:49:40 +02:00
Dave Halter
0f66a3c7a8 Remove the module attribute from the parser. 2017-03-18 03:53:34 +01:00
Dave Halter
448bfd0992 Move the python parser tree. 2017-03-16 17:20:32 +01:00
Dave Halter
97fc3bc23c Refactored the parser calls. Now it's possible to use jedi.parser.python.parse to quickly parse something. 2017-03-14 00:38:58 +01:00
Dave Halter
6d00a5702f If newer versions are using Jedi (e.g. at the moment Python 3.7), it shouldn't just result in a grammar issue, just because that grammar doesn't not exist. Just take the Python 3.6 grammar instead. 2017-01-07 15:54:04 +01:00
Dave Halter
1226962922 Remove dedents from the parser tree. No need for them. 2016-09-11 13:03:29 +02:00
Dave Halter
2563746810 Fix issues with octals in Python 2 (and possibly 3). Fixes #559. 2016-07-17 22:36:26 +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
074a154af3 Fix a small issue that coul dhappen e.g. in stdin. 2016-07-06 08:05:50 +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
0c7894b3e6 Fix a few fast parser tests. 2016-06-02 08:24:52 +02: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
Dave Halter
66557903ae \\\r\n is as possible as \\\n. 2015-04-28 18:53:14 +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
e698e6aeeb Rework some of the analysis statement gathering. 2015-03-05 13:36:41 +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
5e8f8f7a8d Fix issues with error correction / newline correction. 2015-01-27 12:24:54 +01:00
Dave Halter
88a3e25814 Fix newline stuff for empty parsers. 2015-01-27 01:15:39 +01:00
Dave Halter
cc64265187 Grammar modifications so that the Python2.7 grammar looks more like the Python 3.4 grammar. 2015-01-13 01:05:13 +01:00
Dave Halter
ef72f4fb6c Test the new error correction feature. 2015-01-12 01:27:25 +01:00
Dave Halter
fe8a99dfd5 Fix the parser tests. 2014-12-08 00:32:38 +01:00
Dave Halter
34c9422749 The parser tests should also give the parser a grammar. 2014-12-08 00:22:33 +01:00
Dave Halter
03e01631cc Remove NamePart from existance and rename it to Name. 2014-09-26 16:29:53 +02:00
Dave Halter
3add6e4289 Fix various bugs. 2014-09-26 12:22:56 +02:00
Dave Halter
bb5ffe9343 CompiledObject.name returns a Name now, not a string. This is more consistent with the Jedi design and doesn't lead to bugs while ducktyping. 2014-09-03 19:43:21 +02:00
Dave Halter
2616143d10 unicode issues with docstrings should be gone, fixes #420 2014-07-18 17:43:25 +02:00
Dave Halter
e07f51387f added a test for hex value issues in docstrings, see #427 2014-07-18 17:09:44 +02:00
Dave Halter
21341283ca another parser issue, very much related to the last one. sometimes a None element was used as a token.fixes #418 2014-07-18 15:10:10 +02:00
Dave Halter
f64b309ff0 carriage return test for statements that continue, even though they shouldn't 2014-05-04 12:31:21 +02:00
Dave Halter
a97c91002f replace name and statement end_pos (this way we can get rid of all that end_pos crap soon) 2014-03-05 23:46:39 +01:00
Dave Halter
b28f8fc7b4 test_parsing -> test_parser 2014-02-26 10:45:28 +01:00