Dave Halter
d4a10929e2
Starting to create a way of how context sensitive completions can be made.
...
This involves playing heavily with the parser pgen2. We use its stack to check for all possible tokens/keywords.
2016-05-23 18:11:44 +02: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
9dbfb90c20
Fix: Nested flows user scope detection was wrong.
2015-11-25 21:36:17 +01:00
Dave Halter
607f43290f
The backwards tokenizer sometimes parsed not only string literals but also normal names.
2015-04-28 18:10:08 +02:00
Dave Halter
265e6b2c35
Change parser and api to use tree instead of pr.
2015-04-27 23:38:48 +02:00
Dave Halter
df9452f210
Trying to change the import logic completely. We now have a sys.modules like cache.
2015-04-20 14:47:33 +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
47bf1c5daf
Issue with numbers after names in call signatures. It would cause Jedi to stop analysing call signatures. Fixes #510
2015-04-10 02:17:12 +02:00
Dave Halter
a3c2108ecf
Fix and test CallSignature.bracket_start.
2015-03-04 12:15:43 +01:00
Dave Halter
30efdc5e4e
Because we replaced and simplified strings in the last commits (including string ERRORTOKENs), we are now able to remove an error recovery in the backwards tokenizer.
2015-02-25 13:34:12 +01:00
Dave Halter
8c08a4e574
Call signatures again: function definitions and other things that cannot be a part of call signatures stop the process of scanning for them. Also strings get replaced and simplified.
2015-02-25 13:33:09 +01:00
Dave Halter
48392a7dac
Fix some issues in call signatures.
2015-02-24 16:55:33 +01:00
Dave Halter
b8386d29d5
Whitespace before brackets should still show call signatures.
2015-02-24 01:48:25 +01:00
Dave Halter
a9a3387cb0
Refactor user scope search.
2015-02-05 21:52:57 +01:00
Dave Halter
a77ecdbed6
Remove param from get_statement_for_position.
2015-02-05 12:28:55 +01:00
Dave Halter
3a4235eb33
The interpreter is not using the fast parser anymore.
2015-02-05 00:28:54 +01:00
Dave Halter
9a0f1363e3
Start removing the print statements that were used for debugging.
2015-02-01 02:32:52 +01:00
Dave Halter
5e8f8f7a8d
Fix issues with error correction / newline correction.
2015-01-27 12:24:54 +01:00
Dave Halter
4d6afd3c99
Fix fast parser tests.
2015-01-24 00:06:16 +01:00
Dave Halter
f5e687bc22
Use names_dicts now for all completions.
2015-01-07 23:49:13 +01:00
Dave Halter
b2e54ca1eb
The tokenizer now includes all newlines and comments in its prefix.
2014-12-17 20:11:42 +01:00
Dave Halter
9cdf6de206
More positioning for backwards tokenizer.
2014-12-17 17:51:12 +01:00
Dave Halter
d918f8be73
Give the backwards tokenizer a better structure and comments.
2014-12-17 17:30:00 +01:00
Dave Halter
f164dd8892
Fix some newline issues in the backwards tokenizer.
2014-12-17 14:56:46 +01:00
Dave Halter
6eb2af301d
Simplifying reversed line generation of user_context.
2014-12-17 14:04:54 +01:00
Dave Halter
eaace104dd
Replace the tokenizer's output with a tuple (switching back from a Token class).
2014-12-16 00:10:07 +01:00
Dave Halter
936a3c9dfe
Small cleanup: Removed a few print statements.
2014-12-08 16:03:23 +01:00
Dave Halter
b24bf29fc2
Fixed named argument call signature stuff and issues with classes and call signature params.
2014-12-07 23:55:44 +01:00
Dave Halter
e1e5c3a6c7
Progress with call signatures.
2014-12-07 13:56:40 +01:00
Dave Halter
68bd9160e2
Fixed list comprehension name lookups.
2014-12-01 00:08:27 +01:00
Dave Halter
c7862925f5
Small tokenizer changes & tokens now have a prefix attribute instead of preceeding_whitespace.
2014-11-27 01:10:45 +01:00
Dave Halter
1326a2137d
Change the backwards tokenizer that keywords always stop.
2014-11-26 02:32:13 +01:00
Dave Halter
9f45f18ad1
Added a grammar param to the parser.
2014-11-24 01:10:39 +01:00
Dave Halter
c152a1c58b
Actually replace tree with representation (in all the imports).
2014-11-23 19:46:52 +01:00
Dave Halter
aa0c73c9ab
Fixed a few small things in the parser. Flow analysis is working again. Completely.
2014-11-06 04:41:23 +01:00
Dave Halter
afca0ef047
The user context parser should ignore keywords if they are not standing alone.
2014-10-30 01:56:08 +01:00
Dave Halter
ee1c5041ed
use the new implementation of splitlines all over the code, fixes #424
2014-07-18 16:59:22 +02:00
Dave Halter
ede685c717
string prefixes are now recognized by the backwards tokenizer
2014-07-01 01:19:07 +02:00
Dave Halter
ea62ad6a50
backwards tokenizer can now handle 10e-5 and so on literals
2014-04-07 15:51:24 +02:00
Dave Halter
0dd3936c5c
small clean up in the user context backwards tokenizer
2014-04-07 15:39:15 +02:00
Dave Halter
66aca8eba1
user_context now doesn't work with the token tuple anymore
2014-02-25 16:49:44 +01:00
Dave Halter
2252271bf5
fix unicode issues with python2.7
2014-02-25 12:54:06 +01:00
Dave Halter
3a23c80ae5
prepare for eventual? tokenizer end_pos replacement.
2014-02-25 11:59:10 +01:00
Dave Halter
c5fcebde82
changed _compatibility.utf8 -> 'u' and removed a lot of the issues with the now enforced unicode source input of the parser
2014-02-23 11:29:00 +01:00
Dave Halter
fe02088dd7
restructure user_context reverse tokenizer to remove INDENT tokens in the future
2014-02-21 15:30:46 +01:00
Dave Halter
c8d6fbb0a1
temporary changes for the tokenizer issues
2014-02-20 00:43:42 +01:00
Dave Halter
bb111daf91
removed line from tokenizer
2014-02-16 15:28:18 +01:00
Dave Halter
8193f0c2b6
fix an issue with invalid syntax
2014-01-26 20:22:51 +01:00
Dave Halter
ba6a65c477
user_stmt refactoring
2014-01-26 19:30:05 +01:00
Dave Halter
6a4f33f373
call signatures with whitespace seem to be working
2014-01-26 19:13:06 +01:00