1
0
forked from VimPlug/jedi
Commit Graph

160 Commits

Author SHA1 Message Date
Dave Halter
6458047bac Name in statement definition implementation. 2014-10-13 13:33:49 +02:00
Dave Halter
0def3afaaa A move function for Nodes. 2014-10-12 23:37:46 +02:00
Dave Halter
660124aca1 Get an example running: 'import json; json.dump'. 2014-10-12 22:37:23 +02:00
Dave Halter
e2b7e74aef Import improvements. 2014-10-10 17:52:36 +02:00
Dave Halter
a192f4f347 Add keywords, improve import support. 2014-10-10 17:48:40 +02:00
Dave Halter
54c91b1509 Get a first local test passing. 2014-10-10 12:07:08 +02:00
Dave Halter
3bf1fec568 Start implementing an algorithm for actually evaluating the parser tree. 2014-10-10 11:29:22 +02:00
Dave Halter
66840a742c Implement the new parser in jedi.parser.Parser 2014-10-10 00:06:28 +02:00
Dave Halter
68d23840bb Start actual testing of the new parser. 2014-10-09 13:16:28 +02:00
Dave Halter
daee273a08 Remove all the old get_code references. 2014-10-09 11:38:57 +02:00
Dave Halter
843efb43e9 statement refactoring. 2014-10-09 11:36:27 +02:00
Dave Halter
a0092c2653 remove old statement parser code. 2014-10-09 11:20:49 +02:00
Dave Halter
c7c222daab Implement WhiteSpace as well and merge with pytree. 2014-10-09 10:55:03 +02:00
Dave Halter
8236ce18a2 Refactor Literal. 2014-10-09 03:23:52 +02:00
Dave Halter
eb384fc2d1 Name refactoring. 2014-10-09 03:21:18 +02:00
Dave Halter
432ec8f186 Operator refactoring. 2014-10-09 03:15:50 +02:00
Dave Halter
6bb88ddd85 Function is starting to work. 2014-10-08 17:58:02 +02:00
Dave Halter
308c971ad7 Change pr.Simple. 2014-10-08 17:02:37 +02:00
Dave Halter
27444ed64d Remove Import.alias_name_part, it was simply an alias for another lookup. 2014-09-26 16:32:36 +02:00
Dave Halter
03e01631cc Remove NamePart from existance and rename it to Name. 2014-09-26 16:29:53 +02:00
Dave Halter
522c9eda90 Remove pr.Name completely. 2014-09-26 16:18:10 +02:00
Dave Halter
4d7db35340 Fix a few last tests, now Jedi's working again, tests are passing. 2014-09-26 16:02:03 +02:00
Dave Halter
6f29e802c2 Fix an issue with as_names. 2014-09-26 15:48:49 +02:00
Dave Halter
47c4369d28 Fix remaining issues with sys path checks. 2014-09-25 18:28:03 +02:00
Dave Halter
f4c99259b5 Fix an issue with sys.path. Also moved the names closure for isinstance checks away (used for sys.path stuff) and use a get_code check instead, which is more flexible. 2014-09-25 12:35:53 +02:00
Dave Halter
c43afae24a Issues with imports. 2014-09-24 21:12:38 +02:00
Dave Halter
ff61c1d81c Fix an extremely annoying bug that made pickling impossible. 2014-09-24 20:58:29 +02:00
Dave Halter
56243e10c6 The get_code generation of imports was buggy. 2014-09-24 17:48:11 +02:00
Dave Halter
db31536d78 Fix issue with descriptors. 2014-09-24 16:52:44 +02:00
Dave Halter
f300e63dae A couple of changes:
- parser.representation now uses ArrayStmt and ExprStatement to be able to differentiate easily with isinstance.
- NameParts are temporarily allowed again as InstanceElements.
2014-09-24 15:21:56 +02:00
Dave Halter
0a65eea2cf Start to change the logic for self.foo variables. 2014-09-24 14:33:15 +02:00
Dave Halter
d5fbc006e2 Add a names_dict to scopes. This is good for the future parser and now useful to process self.foo and other stuff. 2014-09-24 12:44:24 +02:00
Dave Halter
c61f79314b Introduce get_names_dict to statements to actually fetch the calls out of a statement.
This is going to be the new default method to do dynamic stuff as well as self.foo resolutions for instances.
2014-09-24 12:06:41 +02:00
Dave Halter
5efa467449 Few import issues. 2014-09-22 23:45:48 +02:00
Dave Halter
dae1a48d70 Remove a lot of the old Name.names usages in favor of a direct NamePart usage. 2014-09-22 22:34:33 +02:00
Dave Halter
04cf742973 Temporary parser implementation. Now we're pretty much done with pr.Name. 2014-09-22 17:05:23 +02:00
Dave Halter
c4e45916c6 Modules also use a NamePart as a name, now. 2014-09-22 12:52:48 +02:00
Dave Halter
779618c08b First changes to eventually replace Name by NamePart. 2014-09-22 11:57:19 +02:00
Dave Halter
b2342c76be Refactoring: Make Import.get_all_import_names return NameParts. 2014-09-19 01:40:09 +02:00
Dave Halter
83d2af5138 First imports are working with goto. 2014-09-19 01:21:17 +02:00
Dave Halter
1fb9b4bc6b Completion now always takes a NamePart as input. 2014-09-10 18:59:08 +02:00
Dave Halter
110f130741 Make it possible to get previous statements of Calls. 2014-09-09 16:44:56 +02:00
Dave Halter
ff7680c15f Generate the expression_list of a statement in any case.
This is a consequence of being able to have Calls as parents of Names. Otherwise we would have changing Name.parent values.
2014-09-09 12:54:46 +02:00
Dave Halter
2e7e2f0a29 Name parents are now Calls (once their statements have generated the Calls).
This makes the goto function more powerful. Also fixes an issue with the deep_ast_copy, that I tried to fix previously, but failed, because I hadn't tested it.
2014-09-06 12:19:07 +02:00
Dave Halter
cb84bc0829 Start using ExprStmt. 2014-09-06 10:46:59 +02:00
Dave Halter
f57d9ef675 Rename Name.get_parent_stmt to Name.get_definition, because it's not always a statement. Also start using it in the NameFinder. 2014-09-06 10:43:26 +02:00
Dave Halter
99116cdcb7 Add a Name.get_parent_stmt() function. 2014-09-05 22:26:55 +02:00
Dave Halter
6c07c7acfe Create an ExprStatement class to replace the Statement class in the future and separate array parts of actual statements 2014-09-05 22:21:26 +02:00
Dave Halter
7b2e11d71b Rewrote sys_path._paths_from_assignment. 2014-09-04 14:12:10 +02:00
Dave Halter
18204c4c19 By trying to get rid of search_name in usages, we had to fix an issue with imports:
If used like 'follow(is_goto)', it could return a ModuleWrapper instead of a Name, which is what we actually want.
2014-09-03 19:30:00 +02:00