1
0
forked from VimPlug/jedi
Commit Graph

774 Commits

Author SHA1 Message Date
Dave Halter
b814a91f29 Avoid endless loop with an assert in the diff parser. 2017-03-08 18:33:38 +01:00
Dave Halter
ee98eab64c Merge branch 'dev' of github.com:davidhalter/jedi into dev 2017-03-07 19:01:42 +01:00
Dave Halter
05e05252fa Make python -m jedi.parser.tokenize possible for debugging purposes. 2017-03-07 18:31:12 +01:00
Matthias Bussonnier
0fb386d7e2 Make sure error token set the new_line flag when necessary
Should solve #855
2017-02-24 00:05:38 +01:00
Matthias Bussonnier
ef1b1f41e4 Use start and end position in repr for simpler debugging. 2017-02-14 23:53:53 +01:00
Dave Halter
1d64a5caa1 Replace first_leaf and last_leaf with get_first_leaf and get_last_leaf. 2017-02-03 17:35:53 +01:00
Dave Halter
90fffd883e Clean up the function docstring. 2017-02-03 17:30:58 +01:00
Dave Halter
647aec11a6 Return None instead of raising an IndexError in get_next_leaf. 2017-02-03 17:26:02 +01:00
Dave Halter
c5071f9f49 Change get_previous_leaf to return None if there is no leaf anymore (at the start of the file). 2017-02-03 17:23:15 +01:00
Dave Halter
445bf6c419 Get rid of get_parent_until. 2017-02-03 09:59:32 +01:00
Dave Halter
b3cb7b5490 Remove the def isinstance from the parser. It was a really bad pattern. 2017-02-03 09:37:59 +01:00
Dave Halter
68a3a9cf41 Don't do anything with the diff parser if nothing changes. 2017-01-29 22:12:24 +01:00
Dave Halter
e5af996829 Remove old debug code from the diff parser. 2017-01-29 21:57:09 +01:00
Dave Halter
3f1e658e1d Set the limit for debugging failed diff parsers a bit higher. 2017-01-29 14:34:20 +01:00
Dave Halter
b0f340748c So much work for one simple diff fail. 2017-01-29 00:42:09 +01:00
Dave Halter
9982975ad2 Another small performance improvement. 2017-01-25 22:54:08 +01:00
Dave Halter
4918fb49f5 Implement binary search for get_leaf_for_position. This makes it a lot faster. 2017-01-25 22:27:36 +01:00
Dave Halter
f2db0dceb4 A few small performances improvements on the diff parser. 2017-01-25 21:12:13 +01:00
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