1
0
forked from VimPlug/jedi
Commit Graph

756 Commits

Author SHA1 Message Date
Dave Halter
f4b8a02d37 Add a few speed debugging times to the diff parser. 2017-01-24 09:51:23 +01:00
Dave Halter
09779c88aa Fix a nasty issue in the tokenizer. Fixes #836.
At the same time there was a related issue of not cleaning up newlines properly.
2017-01-24 00:50:37 +01:00
Dave Halter
7623b1e350 Removed tree.is_node.
It's not needed anymore, because we have Node/Leaf.type now.
2017-01-23 20:34:30 +01:00
Dave Halter
64abe401ed The position modifier is not used anymore. 2017-01-23 20:12:17 +01:00
Dave Halter
d85ceb9222 More cleanups in the parser. 2017-01-23 20:10:02 +01:00
Dave Halter
01b25efea1 Use the same function to detect newlines in the diff parser. 2017-01-23 09:56:38 +01:00
Dave Halter
8d2ec6556e Fix a Python 2.7 issue. 2017-01-23 00:36:57 +01:00
Dave Halter
194295066a Fix one more issue in the diff parser. 2017-01-22 23:44:10 +01:00
Dave Halter
08c66207ec Fix the last diff parser test. 2017-01-22 20:27:11 +01:00
Dave Halter
dca35393d5 Remove old code from the diff parser. 2017-01-22 20:22:20 +01:00
Dave Halter
8f4b862892 Fix most diff tests. 2017-01-22 20:13:18 +01:00
Dave Halter
005b24ed54 Better handling of the stack. 2017-01-21 18:43:54 +01:00
Dave Halter
21cd10cefd Get a few diff tests passing. 2017-01-20 20:46:30 +01:00
Dave Halter
73b2287fb4 Fix some tests. 2017-01-20 18:12:09 +01:00
Dave Halter
ebfae050a8 Delete a lof of duplicate code. 2017-01-19 18:31:53 +01:00
Dave Halter
ef31c3d1f4 Some asserts pass now in the tests. 2017-01-19 18:26:50 +01:00
Dave Halter
3bf5f93edd Progress in using a stack in the diff parser. 2017-01-19 09:44:07 +01:00
Dave Halter
fe44458ec0 Start implementing the node stack. 2017-01-16 16:32:49 +01:00
Dave Halter
ad1222e6d7 Fix another parser bug. 2017-01-12 08:46:58 +01:00
Dave Halter
0141711af8 Diff parser docstring. 2017-01-10 19:17:37 +01:00
Dave Halter
425fba5e95 Move the parser.fast module to parser.diff. 2017-01-10 19:15:47 +01:00
Dave Halter
7300f3e7ef Fix issues with Python 3.6's f strings and underscores in numbers. 2017-01-08 19:39:14 +01:00
Dave Halter
00a9f1ec0a Update the tokenizer to include f literals and underscores. Need tests still. 2017-01-08 16:03:45 +01:00
Dave Halter
3f09f3a304 Add support for PEP 0526.
This makes it possible to assign variables like

    asdf: typing.List[int] = []
2017-01-08 03:57:35 +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
5b9e5f96aa Merge with master. 2017-01-02 13:05:45 +01:00
Francisco Souza
14e722ff13 parser: add grammar3.6
I manually replicated the changes that were applied to grammar3.5.
2016-12-30 22:18:03 -05:00
Dave Halter
375fcd9e66 Fix an issue with nested flows in the diff parser. 2016-12-31 03:12:56 +01:00
Dave Halter
29e286488b Fix the last remaining fail in the diff parser. 2016-12-30 21:13:44 +01:00
Dave Halter
61c7444185 Fix some more issues in the diff parser that caused it to completely crash. 2016-12-30 20:13:05 +01:00
Dave Halter
b3f9b9eed3 Trying to refactor divide_nodes into a more general state. 2016-12-23 18:20:09 +01:00
Dave Halter
f437ce5ae7 Some diff parser refactorings. 2016-12-22 09:13:14 +01:00
Dave Halter
464968aed7 Fix an issue where compiled object api types raised an error. 2016-12-21 00:23:50 +01:00
Dave Halter
90b76ee3ec Fix an issue in the diff parser. 2016-12-20 23:32:51 +01:00
Dave Halter
68fabc3048 Increase parser pickling. 2016-12-20 09:51:13 +01:00
Dave Halter
fda0f80573 Remove global_names from modules. 2016-12-18 22:21:06 +01:00
Dave Halter
5c52c7fb45 Completely remove names_dicts from the diff parser. 2016-12-17 17:15:44 +01:00
Dave Halter
6736b1a5ce Fix some docstring stuff. 2016-12-05 09:42:51 +01:00
Dave Halter
6f4cd7e6d3 Improve api class tests. 2016-12-04 20:04:54 +01:00
Dave Halter
439e394535 Fix call signatures. 2016-12-04 03:52:33 +01:00
Dave Halter
5b81a2375d More tests and better understanding of if/try branches name resolution. 2016-11-29 10:21:50 +01:00
Dave Halter
aaaa3c24a5 Listeners should not be part of the parser tree. This is logic that belongs to the evaluation. 2016-11-02 09:22:19 +01:00
Daniel Hahler
a5480c054d parser.utils.clear_cache: clear self.__index
This fixes a potential FileNotFoundError when clearing the cache
manually, using the method from
https://github.com/davidhalter/jedi-vim/pull/625.

Traceback:

```
  File "…/jedi/evaluate/imports.py", line 342, in _do_import
    module = _load_module(self._evaluator, module_path, source, sys_path, parent_module)
  File "…/jedi/evaluate/imports.py", line 457, in _load_module
    cached = load_parser(path)
  File "…/jedi/parser/utils.py", line 72, in load_parser
    return ParserPickling.load_parser(path, p_time)
  File "…/jedi/parser/utils.py", line 126, in load_parser
    with open(self._get_hashed_path(path), 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '…/.cache/jedi/cpython-35/759d60e96c76f41ffd882d9b8d844899.pkl'
```
2016-10-14 14:25:18 +02:00
Dave Halter
2f1e9d634f FunctionExecution improvement. 2016-10-02 19:54:03 +02:00
Dave Halter
249049b10c Start using filters for name resolution. 2016-09-30 13:29:20 +02:00
Dave Halter
9b85d5517f Fix more issues in the diff parser. 2016-09-27 00:29:11 +02:00
Dave Halter
c728148ece Fix an issue with dividing suites and remove a lot of print statements. 2016-09-23 17:31:29 +02:00
Dave Halter
e371b670f5 Remove a comprehension hack in the parser that would have made the diff parsers world hell. 2016-09-22 18:26:09 +02:00
Dave Halter
c161e33119 Fix one more issue with the fast parser. 2016-09-21 20:36:54 +02:00
Dave Halter
8aeeaec9c3 Remove some print statements 2016-09-18 20:43:52 +02:00