Dave Halter
60e4591837
Fix: End detection for strings was mostly wrong, fixes #51
2019-01-23 10:13:25 +01:00
Dave Halter
574e1c63e8
Apply \r changes in syntax trees
2019-01-09 00:34:19 +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
badb2fe010
Move transition_to_generator to transitions
2018-06-28 09:42:37 +02:00
Dave Halter
8e118c913c
Remove note about print as absolute import. This is probably not going to happen anymore, Python 2 is pretty much end-of-life
2018-06-28 01:01:46 +02:00
Dave Halter
52fc8fc569
Finish the stack in a way we want to.
2018-06-28 00:59:55 +02:00
Dave Halter
97cdb448d4
Pass tokens around and not all the different token values
2018-06-28 00:33:22 +02:00
Dave Halter
603b67ee6d
Just always pass token objects to the tokenizer
2018-06-28 00:18:44 +02:00
Dave Halter
7686273287
Use the stack from the parser itself
2018-06-28 00:12:18 +02:00
Dave Halter
692436ba12
Don't use grammar as an argument anymore, because it's already there
2018-06-28 00:01:47 +02:00
Dave Halter
edce279dee
Remove a function that was no longer used
2018-06-27 23:19:57 +02:00
Dave Halter
a9e40eb578
Simplify error recovery for suites
2018-06-27 22:21:17 +02:00
Dave Halter
e4efebc9f3
s/ilabel/transition/g
2018-06-26 23:05:04 +02:00
Dave Halter
43d4a8a834
Don't use a function that doesn't work
2018-06-24 23:45:18 +02:00
Dave Halter
c5d141bf60
Make some more things faster
2018-06-24 16:43:28 +02:00
Dave Halter
03de9cebb8
Introduce TokenTypes
2018-06-24 16:24:09 +02:00
Dave Halter
b5378e4602
Use token.OP and use reserved words
...
This change breaks the tokenizer backwards compatibility a bit. Details of
operators is now part of the parser and not the tokenizer anymore. The parser
does this anyway, so we don't need the complexity in the tokenizer.
2018-06-24 11:28:23 +02:00
Dave Halter
532aef2342
Remove nonterminal2number and number2nonterminal, they are no longer used
2018-06-22 12:52:44 +02:00
Dave Halter
a85f544901
Fix all tests except diff tests. Mostly error recovery fixes
2018-06-22 11:12:10 +02:00
Dave Halter
9e8066c6fd
Fix a lot of the old error recovery
2018-06-22 09:56:58 +02:00
Dave Halter
68eab72229
Some slight changes to error recovery
2018-06-22 01:59:39 +02:00
Dave Halter
d9264609f2
Get quite a bit of the error recovery working
2018-06-22 01:56:29 +02:00
Dave Halter
79c7e0b59d
Use the new parser. Error recovery is not yet working
2018-06-22 00:38:18 +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
1e18163402
Better recovery for online classes and functions
2018-06-12 13:23:49 +02:00
Dave Halter
cef9f1bdbd
Fix one-line error recovery for all things that are using a suite
...
Fixes https://github.com/davidhalter/jedi/issues/1138 .
2018-06-12 12:56:27 +02:00
Dave Halter
f6935935c0
Use proper leafs for fstring start/end
2018-04-07 12:32:33 +02:00
Dave Halter
a3e280c2b9
Use strings as a non-terminal symbol in all grammars
...
This makes it easier to write the same logic for all Python versions
2018-04-05 09:55:19 +02:00
Dave Halter
66606403c7
Most fstrings issues should be fixed now.
2017-08-26 19:15:09 +02:00
Dave Halter
1893f77e15
Add issue "f-string: expecting }".
2017-08-26 11:53:59 +02:00
Dave Halter
d6c624bd34
Finally fix Python 2.6.
...
Also added a syntax for 2.6. There are some thing that just don't work in 2.6.
2017-07-31 21:33:59 +02:00
Dave Halter
790bc459ed
Make a proper recovery for only error statements in a suite.
2017-07-18 17:53:04 +02:00
Dave Halter
6ee986aa45
Remove some code that wasn't doing anything.
2017-07-17 08:49:02 +02:00
Dave Halter
e3f7427c99
Restructure the Python 2 grammar to be closer to the original Python 2 grammar in case of list comprehensions.
2017-07-16 22:14:15 +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
7198df85ba
Remove issue if the previous leaf is an error leaf.
2017-07-08 23:12:08 +02:00
Dave Halter
be54401388
Fix some stuff that caused issues in Jedi.
2017-06-02 00:15:37 +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
b367058af6
Temporary work on carriage returns.
2017-05-31 08:59:49 +02:00
Dave Halter
c734df407b
Use the name pgen_grammar instead of grammar to avoid confusion of the two.
2017-05-21 17:22:21 -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