On Thursday, January 21, 2016 at 8:33:27 AM UTC-6, Edward K. Ream wrote: > Javascript idioms (and syntax) are a form of code obfuscation...
Let's treat this sad fact as an opportunity for Leo by improving Leo's javascript importer :-) The syntax that is found in the jQuery sources makes the importer a challenge: 1. Comma-separated lists of functions, 2. JS "iife"s, functions (simulated classes) followed immediately by an argument list, 3. Nested versions of 1 and 2 inside functions, objects, conditionals, etc., etc. The present js importer doesn't handle regex's properly. After this is fixed, the first goal will be to import the jQuery sources in a Leonine manner. The simplest thing that could possibly work, and perhaps the best for the user, will be to use @others "almost everywhere". That is, the importer would use section references only where two @others would otherwise appear in the same node. But perhaps this would make it too easy to change the order of nodes, which might alter the meaning of the js code. This (and other) choices may have to be settings. I am prepared to use a custom importer if need be. A lot of work would be justified if Leo could render complex js sources as easily understood outlines. Another project would be to add a coffeescript importer... 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
