Commit Graph

5838 Commits

Author SHA1 Message Date
Dave Halter
52d855118a Remove get_parsed_node from the parser as well. 2017-03-18 03:55:23 +01:00
Dave Halter
0f66a3c7a8 Remove the module attribute from the parser. 2017-03-18 03:53:34 +01:00
Dave Halter
d0b6d41e99 Remove the old star import cache, because it's not even used. 2017-03-18 03:30:23 +01:00
Dave Halter
aaf6c61e69 Make remove_last_newline private. 2017-03-18 03:07:01 +01:00
Dave Halter
519fa9cfb5 Remove complicated merging of used names from the parser.
It's a lot of complicated code and a lot can go wrong. It also didn't speed up anything. If anything it made things like 5% slower. I have tested this with:

./scripts/diff_parser_profile.py wx._core.py

wx._core.py is not part of Jedi.
2017-03-16 22:00:01 +01:00
Dave Halter
ce41119051 Fix some stuff in a diff profile test script. 2017-03-16 21:45:51 +01:00
Dave Halter
8156a6b8a2 Remove used_names from the parser step. It's a separate iteration, now. 2017-03-16 21:28:42 +01:00
Dave Halter
fd50146f92 Simple cleanup. 2017-03-16 20:20:58 +01:00
Dave Halter
96c67cee26 Simplify the leaf with newlines stuff. 2017-03-16 20:18:30 +01:00
Dave Halter
4573ab19f4 Separate the python syntax tree stuff from the non python stuff. 2017-03-16 19:54:08 +01:00
Dave Halter
448bfd0992 Move the python parser tree. 2017-03-16 17:20:32 +01:00
Dave Halter
b136800cfc Don't use as in imports when not needed. 2017-03-16 08:45:12 +01:00
Dave Halter
06702d2a40 Move the python parser. 2017-03-16 08:40:19 +01:00
Dave Halter
a83b43ccfd Merge branch 'dev' of github.com:davidhalter/jedi into dev 2017-03-15 19:12:51 +01:00
Dave Halter
93f14157a6 Cleanup the ParseError stuff. 2017-03-15 18:41:58 +01:00
Dave Halter
0effd348e8 Add a note about the grammar creation. 2017-03-15 18:18:06 +01:00
Dave Halter
c332fba488 Fix a namespace packages related issue. 2017-03-15 08:59:24 +01:00
Dave Halter
375749c5c3 Small restructuring. 2017-03-15 08:56:49 +01:00
Dave Halter
55c9fd3227 Fix an issue in the fake parser 2017-03-15 08:44:49 +01:00
Matthias Bussonnier
9a851165ad Lookup optimisation
avoid a couple of dynamic lookup in the core of the parsing loop.
Performance improvement will be minimal, but adding a little many time
can be consequent.
2017-03-14 23:55:03 +01:00
Matthias Bussonnier
bb8fe0b24c A missing docstring. 2017-03-14 23:54:38 +01:00
Dave Halter
68a7365a0a A few docstring improvements. 2017-03-14 21:03:03 +01:00
Dave Halter
9efb3f0af2 More direct parser usage removals. 2017-03-14 19:31:54 +01:00
Dave Halter
717bfeb574 Remove an occurance of the complicated parser creation. 2017-03-14 19:27:03 +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
9b5e6d16da Improved grammar loading API. 2017-03-13 20:33:29 +01:00
Dave Halter
595ffc24d4 Move some more stuff to a python directory in the parser. 2017-03-13 00:54:39 +01:00
Dave Halter
922c480e2e Moved the parser to a new file. 2017-03-12 21:33:41 +01:00
Dave Halter
a635b6839a Remove unused code. 2017-03-12 21:28:32 +01:00
Dave Halter
af9b0ba8d6 Merge branch 'master' into dev 2017-03-12 20:51:17 +01:00
Alex Wiltschko
82d165a723 Missing paren 2017-03-12 20:41:17 +01:00
Dave Halter
a7b1e3fe70 Fixed another diff parser error. 2017-03-12 15:58:14 +01:00
Dave Halter
6e3b00802c Another endless while loop issue, add an assert. 2017-03-11 14:54:44 +01:00
Dave Halter
818fb4f60c Fix a bug that might have caused an endless while loop a while ago. Fixes #878. 2017-03-09 21:47:16 +01:00
Dave Halter
ccef008376 Python 2 compatibility. 2017-03-09 21:06:20 +01:00
Dave Halter
c7a74e6d1c Make the tokenizer a generator. 2017-03-09 18:53:09 +01:00
Dave Halter
989e4bac89 Speed up splitlines.
We use the python function again with the modifications we need.
I ran it with:

    python3 -m timeit  -n 10000 -s 'from jedi.common import splitlines; x = open("test_regression.py").read()'

The speed differences are quite remarkable, it's ~3 times faster:

    10000 loops, best of 3: 52.1 usec per loop

vs. the old:

    10000 loops, best of 3: 148 usec per loop

We might need to speedup splitlines with  as well. It's probably
also a factor 2-3 slower than it should be.
2017-03-09 08:58:57 +01:00
Dave Halter
b814a91f29 Avoid endless loop with an assert in the diff parser. 2017-03-08 18:33:38 +01:00
Dave Halter
5c9769c5a3 Merge remote-tracking branch 'origin/master' into dev 2017-03-07 19:01:53 +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
micbou
a859add6d7 Only resolve names for actual modules
A name can be part of an import statement without being a module.
2017-03-01 21:06:21 +01:00
Matthias Bussonnier
fc27ca1b6a 'fix a couple of error locations' 2017-02-24 13:03:03 +01:00
Matthias Bussonnier
784de85b36 Add test for handeling of newline in multiline strings 2017-02-24 00:05:38 +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
daniel
5513f72987 added support for implicit ns packages and added tests 2017-02-23 23:53:14 +01:00
Matthias Bussonnier
ef1b1f41e4 Use start and end position in repr for simpler debugging. 2017-02-14 23:53:53 +01:00
Daniel M. Capella
68c6f8dd03 readme: Add maralla/completor.vim
https://github.com/maralla/completor.vim
2017-02-14 22:51:17 +01:00
Matthias Bussonnier
b72aa41019 Missing assert 2017-02-08 23:40:23 +01:00
Thomas Kluyver
adc08785b6 Build universal wheels
This tells wheel that the packages are compatible with Python 2 and 3.

The wheel currently on PyPI is only tagged 'py2', so installing on
Python 3 uses the sdist.
2017-02-04 18:13:18 +01:00