On Wednesday, January 17, 2018 at 4:41:30 AM UTC-6, Edward K. Ream wrote: On Wed, Jan 17, 2018 at 3:54 AM, vitalije <vitali...@gmail.com> wrote: > > Regarding js importing, after some research about the topic, I concluded >> it is not possible/practical to make perfect js importer that can fully >> import javascript code on its own. >> > ...
> Doing it right would require building complete AI for this problem space >> and perhaps dealing with neural networks feeding them with big data >> collected from github and other source code repositories. >> > I want to emphasize that js_i.starts_block and js_i.scan_line are the *only *code involved in the AI. If there are errors in the present code, only these two methods will change. The code looks for *whole lines* of a certain form, namely lines whose parens and/or curly brackets counts change and which also have 'function' in the line. As I re-read the code, I see that it might be possible to contrive an example where this strategy fails. If real (not imagined) problems arise, they can be dealt with in js_i.starts_block and js_i.scan_line. As an extreme measure, js_i.scan_line could set an ivar that tells whether "function" appears outside of any string. In short, the present importer framework is robust and flexible. I will reject other approaches unless real, impossible-to-fix problems are found. 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 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.