Today, I've completely rewritten split_root function. This was necessary to 
allow importing files from mypy repository.
Rev ee7ff9c51f8a7 successfully imports all python files from mypy 
repository except one. One of the files (misc/upload-pypi.py) has a line in 
the comments that looks like section reference and Leo can't produce same 
output as is the input, because the section is missing.

Regarding your condition that new importer must use vnode_info, IMHO that 
would be just a make-work. There is no need for any post pass because new 
importer deals with decorators and comment lines as well as blank lines, 
and it adds at-language and at-tabwidth directives. 

I plan only to clean up a little this new version and to add some comments 
and explanations. In case you find some other input that new importer can't 
import, I'll try my best to fix the issue. But I don't plan to use 
vnode_info. If you really wish it, you can add it yourself. It would be 
easy to reverse engineer vnode_info from the resulting outline, but I have 
zero interest doing that.

I'll write an ENB on the subject when I finish cleaning and documenting 
code.
On Wednesday, December 8, 2021 at 3:56:08 PM UTC+1 Edward K. Ream wrote:

> On Wednesday, December 8, 2021 at 8:43:45 AM UTC-6 Edward K. Ream wrote:
>
> At rev 7b109931aa, the importer crashes for 81 mypy files.  There is no 
> indication elsewhere that the crash has occurred. There probably should be.
>
> All 81 failures have the same underlying cause, namely calls to 
> tokenenize.generate_tokens. There are two such calls in the new importer. 
> Depending on the source code, the calls raise either IndentationError or 
> tokenize.TokenError.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/20a6946f-d633-4305-bd93-cc3ae89d0721n%40googlegroups.com.

Reply via email to