On Friday, February 23, 2018 at 10:22:55 AM UTC-6, vitalije wrote:

Cleaning generated headlines is just a part of the problem. More serious 
> problem is choosing what should go in to single node.

I agree completely.

> As far as I am concerned, I would much prefer to have a toolbox with 
> several commands to help me importing files on my own. I wrote about that 
> idea here 
> <https://groups.google.com/d/msg/leo-editor/xyO4LQHrAWQ/pH5yMnn-AAAJ>. I 
> don't know when (and if) I would have time to write such a plugin. Solving 
> this serious problem (* importing external source files) in fully automatic 
> but satisfactory way IMHO must involve writing a proper lexer/parser 
> functions at least for .js .jsx, .ts .tsx files. That seems to be a lot of 
> work, so I believe more likely is that I would pursue this simpler idea - a 
> plugin with handful of universal functions for manipulating source code, 
> that user can use to reshape code any way he/she likes. That would work for 
> all kinds of source files.

Remember that all importers have a post pass in which they are free to 
alter the already generated nodes.

Javascript is probably unique in all commonly-used languages in not having 
a proper, *always used*, syntax for generating classes, functions and 
methods.  This makes the problem *much* harder for js than it is for all 
other languages.

Afaik, there are few if any problems with other languages.  Once in a while 
the python importer has troubles with if statements at the top level 
interacting with decorators.  That's about it.  Tweaking the python post 
pass should fix this, but it's a low priority item.

So yes, have at it if you will.  But remember that many (most?) problems 
with imports can be fixed by hand in the generated @clean tree.


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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to