On Thu, Jan 30, 2014 at 5:46 PM, Edward K. Ream <[email protected]> wrote:
> ===== Summary > > 1. A prepass will probably be needed to ensure that all nodes in the @file > tree have the proper format. > In fact, the regularizer prepass will probably be needed whenever writing with new_auto enabled. This will prevent read errors later. The problem is that the write code can not tolerate "mixed" class definitions, where some methods are defined in the class node itself. Since the user could create such mixed definitions at *any* time (not just in @file nodes) the regularizer must always protect the write code so that the unls will correspond to reality. > 2. No obvious solution exists so far for organizing initial declaration > nodes. Some real invention will be required. > My previous writing was unclear. We can not tolerate sentinels at any time, no matter how "light". That being so, there is no obvious way of telling the importer code about the desired structure of leading declarations in a file. As I write this, I suppose we could use a version of the @shadow idea (maybe with info contained in the @auto-view tree) but this looks pretty heroic right. Maybe something can be done later, but for now we seem to be stuck with a single "declarations" node, as created by the present importers. Not great, but not a show stopper. ===== Summary Yesterday's by-hand munging of leoGlobals.py showed that a prepass is needed, and showed that the prepass would be relatively straightforward. Imo, this prepass should *always* be run before writing an @auto tree. As implied yesterday, this prepass will be based on a modified version of the parse-body command. However, parse-body needs work in various ways. I expect to be working on this today. For the time being, there is no way to add structure to leading declarations. Imo, the importers will *never* be able to add that structure: without sentinels they don't have enough data. In the future, it might be possible to munge the leading declarations node using data in the @auto-view tree, but this would be an heroic solution. Two important points: 1. Imo, a project this ambitious requires that I be a regular user of it. It must be *easy* and *comfortable* to use the @auto for all of Leo's files. If I can't eat this dog food, I can't expect anyone else to eat it. 2. Yesterday's by-hand work turned out to be a prototype of the not-yet-written prepass. This prototype gives me much more confidence that everything can indeed be made to work. 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 http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/groups/opt_out.
