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
Dave Halter
77673ba986
Add an optional param 'parent' to parser.representation.Simple, which simplifies some calls to that superclass.
2014-08-19 00:30:17 +02:00
Dave Halter
8006d6f190
Change implementation of StatementElement.
...
Instead of having both next and execution as attributes, we now only have next, because it's an execution if there's an array.
2014-08-18 22:25:55 +02:00
Dave Halter
00d15da143
refactor search_call_signatures. Now we don't need to set Call.next.parent in a strange way anymore and the whole thing seems to be more logical.
2014-08-18 14:51:38 +02:00
Dave Halter
9f38f10366
fix tests. Operators should not equal to other operators with a different position. or even parent.
2014-08-18 13:13:07 +02:00
Dave Halter
1d812c2414
Use the "wrong" parents again for next/execution in StatementElement. This is important for call_signature lookups. We might still be able to change this somewhere in time.
2014-08-18 11:22:38 +02:00
Dave Halter
89ab0ba137
Fix fast_parent_copy. The caching is now more solid than before (and doesn't produce weird side effects. This also solves an issue with Lambdas. However, by fixing all of this we have broken some other things.
2014-08-15 01:55:43 +02:00
Dave Halter
1f9e7ddff8
Remove code in the parser that didn't make sense.
2014-08-14 13:24:26 +02:00
Dave Halter
6b7ce590fa
Simplify get_parent_scope
2014-08-12 01:37:58 +02:00
Dave Halter
33e5a3280a
Remove IsScope in favor of an is_scope function.
...
This function was partially implemented anway. Now we've also added a function called 'get_parent_scope', to make it easy to get a scope of a Call, Statement, whatever.
2014-08-12 01:19:19 +02:00
Dave Halter
138fa1b4de
deletion of returns from SCOPE_CONTENTS was wrong.
2014-08-06 22:42:38 +02:00
Dave Halter
23c39eff9a
fix lambda issues
2014-08-06 12:40:08 +02:00
Dave Halter
c44168f7ad
add a Flow.previous attribute to be able to access the if flow from an else clause.
2014-08-05 11:17:18 +02:00
Dave Halter
7bd76022bf
get rid of the whole is_callable stuff, because now we can just check for hasattr(obj, 'py__call__')
2014-07-30 15:50:47 +02:00
Dave Halter
440b9b072e
Merge pull request #441 from davidhalter/dynamic_inheritance
...
Dynamic superclasses
2014-07-27 18:26:48 +04:30
Danilo Bargen
e8f479172a
Implemented dynamic superclasses
2014-07-27 14:11:48 +02:00
Danilo Bargen
c97e1732ee
Operator statement wrapper was missing ( fixes #436 )
2014-07-27 12:53:18 +02:00
Dave Halter
606b6851ff
remove the scope_names_generator stuff again. We should enable it somewhere in time, but for now it just breaks tests.
2014-07-27 09:43:22 +02:00
Dave Halter
c85bdb8ff1
little edge case of modules that don't have a scope_names_generator, which is unfortunately missing, but not really used in Jedi.
...
At europython's hackathon we played with it and @scoder added a small script to cython/Cython/Compiler/JediTyper.py, which makes it possible to add Cython types to a Python script.
2014-07-26 13:18:04 +02:00
Dave Halter
852cdad754
Operator fixes. Subclass of Simple, now.
2014-07-22 16:02:34 +02:00