Commit Graph

39 Commits

Author SHA1 Message Date
Dave Halter
a9f58b7c45 Ignore ERROR_DEDENT in graph validation 2019-01-02 12:15:05 +01:00
Dave Halter
d2542983e9 Fix diff parser: get_last_line was sometimes wrong
Now the calculation is way simpler. Still annoying that it even happened.
2019-01-02 01:39:53 +01:00
Dave Halter
64cf24d9da Fix error reporting order for diff issues 2019-01-02 00:33:43 +01:00
Dave Halter
c7c464e5e9 Avoid nasty side effects in creation of Node
This issue led to bugs in Jedi, because Jedi used the nodes in a wrong way.
2019-01-01 23:35:20 +01:00
Dave Halter
29325d3052 Make parso errors even more informative 2018-12-31 11:47:02 +01:00
Dave Halter
750b8af37b Fix diff parser get_last_line calculation 2018-12-31 01:25:11 +01:00
Dave Halter
0126a38bd1 Fix graph asserting for error indents 2018-12-30 18:20:55 +01:00
Dave Halter
c2985c111e Better checks for checking valid graphs 2018-12-30 16:34:11 +01:00
Dave Halter
45f9d4b204 Create better ways for debugging the diff parser 2018-12-30 16:03:54 +01:00
Dave Halter
f99fe6ad21 Fix diff-parser: Copying parts of if else should not lead to the whole thing being copied 2018-12-30 15:25:17 +01:00
Dave Halter
e5fb1927bb Fix: Make the NodesStack to a NodesTree
This fixes an issue with positions that were doubled if the stack was closed too early.
2018-12-30 01:27:37 +01:00
Dave Halter
0ef4809377 Fix for diff parser : Make sure that start_pos are growing always
The problem was that functions/classes were sometimes not well positioned. Now
all diff tests are ensuring that leaves always grow.
2018-12-28 21:49:49 +01:00
Dave Halter
ada84ed063 Add parso version to an exception 2018-12-27 13:33:10 +01:00
Dave Halter
e7f71a3eba Use one simple functions to check for funcdefs in diff parser 2018-07-08 20:30:31 +02:00
Dave Halter
3f7aad84f9 Make sure to treat async funcdefs the same way as normal funcdefs 2018-07-08 20:18:15 +02:00
Dave Halter
52e3db4834 Fix an issue in the diff parser
Forgot to check for functions/classes that were part of a decorator/async func.

Fixes https://github.com/davidhalter/jedi/issues/1132
2018-07-06 01:25:06 +02:00
Dave Halter
f7d3d4e82f Merge the PgenParser and our own parser 2018-06-27 23:45:04 +02:00
Dave Halter
03de9cebb8 Introduce TokenTypes 2018-06-24 16:24:09 +02:00
Dave Halter
4e5ba02dbb Fix the final issues of the new parser 2018-06-22 11:38:34 +02:00
Dave Halter
73ce57428b Try to completely remove the word symbol and use nonterminal
The ones that we could not remove are in grammar.py, because that's the public documented API.
2018-06-17 18:30:20 +02:00
Dave Halter
c2eacdb81c The diff parser was slighly off with prefixes, fixes #1121 2018-05-20 19:13:50 +02:00
Dave Halter
065da34272 Fix an issue in the diff parser about endmarker newlines
This was discovered in https://github.com/davidhalter/jedi/issues/1000.
2018-03-11 23:41:18 +01:00
Dave Halter
1f6683b8ac Don't use the root logger
The root logger should not be used in parso. Use custom loggers for each module. Fixes #9.
2017-10-12 22:59:17 +02:00
Dave Halter
b921e280b0 Some last fstring fixes. 2017-08-28 18:10:30 +02:00
Dave Halter
88c3c0567a Rename TokenInfo to PythonToken. 2017-08-21 09:33:41 +02:00
Dave Halter
ab027885c7 Refactor splitlines -> split_lines. 2017-08-15 19:54:21 +02:00
Dave Halter
6876e1b7c0 Use ERROR_DEDENT instead of ERRORTOKEN for wrong dedents. 2017-07-19 20:15:06 +02:00
Dave Halter
e731eecdd8 Make the tokenizer version independent. 2017-07-11 23:29:44 +02:00
Dave Halter
9899c703ea Fix a diff parser issue. 2017-07-09 11:55:23 +02:00
Dave Halter
c28ec5f182 Move tokenize.py and token.py to the python folder. 2017-07-09 00:06:14 +02:00
Dave Halter
b1b165c21e Actually pass the tests again with removed remove_last_newline. 2017-06-01 18:29:52 +02:00
Dave Halter
814b16cc6c Remove the remove_newline hack and build that stuff into error recovery instead.
Tests are passing except for diff parser tests.
2017-05-31 21:24:24 +02:00
Dave Halter
7b8455174a Remove more unused code. 2017-05-26 14:06:40 -04:00
Dave Halter
976c5151af Rename source_tokens to tokenize and generate_tokens to tokenize_lines. 2017-05-26 12:01:35 -04:00
Dave Halter
b4259b2b4f Change the default of use_exact_op_types in the tokenizer. 2017-05-26 11:32:00 -04:00
Dave Halter
4ca92861c6 Use pgen_grammar more consequent. 2017-05-21 17:35:06 -04:00
Dave Halter
4bc5e27430 Make an internal function public, because it was used outside of the defining module. 2017-05-19 10:05:56 -04:00
Dave Halter
fb05fb4c19 Get rid of most jedi usages. 2017-05-14 13:51:04 -04:00
Dave Halter
150fb4c86e Add an initial version of the code from Jedi.
Still includes imports that have to be removed.
2017-05-11 07:13:23 -04:00