Skip to content

Conversation

mpourmpoulis
Copy link
Owner

No description provided.

…andling triple quoted strings

Resolves #18 fixing a typo introduced in
0fcbc51 And taking Care of triple quoted strings
…mbdas

This Temporaril address is part of the issue #17 Now the existence of lambda in the code has no effect!
…with *

Definitions of the form `lambda *x,**k:x` are valid code but if there is a Error else where The repair module Would try to boot it dummy variable after lambda causing a syntax error
…commas

If I remember correctly those additional Special cases were added In order to prevent repairing use cases where * is used as a delimiter separate keyword only arguments from positional ones in function definitions. Nonetheless An additional dummy node does not really hurt, where is it missing prevents us from repairing things like lambda x,*,**k
…en he does at the end of the file

first attempt to resolve #19  and  more code and cleanups are needed
Remember "".isspace()==False
…oken Function and fix typo

atok.next_token(orig_token) Can throw exception, Which the wrapper function handles.

Some cleanups from For the solution to #19
Also fix the typo, which I accidentally introduced at 7dc83f9 Replacing root with step...
Yet another commit for #19

By using the range version, we get to redo use time complexity from O(nodes) to something closer to O(depth)

We also alter the signature of node_from_range to remain backwards compatible With previous versions for obtaining note selection

Finally, A small detail to notice Is that
 the inside function used for single car ets Is slightly changed
Technically it is not considered a statement in the Python AST But for our purposes it can serve such a role

Resolves #20
…d_exception_handler

Resolved #21

Without this addition, the default behavior of the create fake function is

`fake_node.parent = root.parent if parent is None else parent`

Causing the exception name to have that ast.Try node as a parent instead of the exception handler
escaping quotes was the root of #23
They should not be Resolved
…_part

The Main news are Argument queries into sub indexing queries were calling line_partial Missing an argument(the code) ( from the age of the dinosaurs 5f6fc5a and More recently d9a049e respectively) .

With this fixed,As long as the code tokenize correctly, If there is a syntax error somewhere else in the code that is unrecoverable, those queries can parse only the current logical line instead
…heck for none

resolves #26
A check for none was missingAce but more importantly most of the functions expected none values When at the end of file But received EOF token instead
…es of functions

While normally, if on an empty line origin is going to bound to the line below, On the boundaries between functions  It will bound upwards by design.

Unfortunately, These caused An issue because to prevent all my one errors When going upwards When the statements spread over multiple lines, there were checks  if we were below its beginning but not thief we were above its ending( because otherwise Origin would normally bound to the linee below!).

These commit Add those checks and resolve #28
…gy to be completely crossed out

Implements #27 while the same time making reestablishing priority function more readable.

At the same time, penalizing now happens Within the result accumulateor
…node like ast.Store

these came up during the Re-factoring for issue #19
I must have fixed this blog at least three times and Then stashed the changes
…rsor is at the beginning of the line or the whole line is selected

resolves #30
relevant to their factoring going on due to #19

The loop was not checking if the token produced is None which caused problems when the cursor Was at the beginning of the file in an empty line
These issue helps resolve #36 because inside queries needed to run a whole bunch of tie-breaking runs on smaller collections of data and the overhead of recomputing the LCA tree every time was skyrocketing their response time
This addition was neededSo the queries of the form "inside nth argument" would work properly. In particular, for these type of queries tiebreaking Needs to happen after inversion because we need to pick the closest call that satisfies the nth description with respect to its (local) parent. Otherwise, the result produced would not be even deterministic,as helpful will not be ordered!!!
These left over print statement were causing crashes if x was None, as may be the case for instance in queries of the form "inside 2 argument 1"
…missing nth

for these kind of queries nth decoding  Should happen inside the transformation function not inside process_line. These was causing problems, because queries that they don't specify an inside index("inside first argument 1" As opposed to "inside 1 first argument 1") Were not searching All of the arguments of the parent call But only the one with index 1
@mpourmpoulis mpourmpoulis self-assigned this Jul 21, 2020
@mpourmpoulis mpourmpoulis merged commit 7d9fbbb into master Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant