On Jul 7, 8:57 am, "Edward K. Ream" <[email protected]> wrote: > I plan no further work on the new-sentinels branch, other than to > update and simplify the overall docs.
Here are the latest high-level overview of new sentinels, as found in the << about new sentinels >> section: Surprisingly, it's easier to read new sentinels than to read old sentinels: - There must be closing sentinels for section references and the @all and @others directives, collectively known as **embedding constructs.** Indeed, these constructs do not terminate the node in which they appear, so without a closing sentinel there would be no way to know where the construct ended and the following lines of the enclosing node began. - The read code "accumulates" body text of node v in v.tempBodyList, a list of lines. A post-pass assigns v.tempBodyString = ''.join(v.tempBodyList). This assignment **terminates** the node. - The new read code *never* terminates the body text of a node until the post-pass. This is the crucial simplification that allows the read code not to need @-node sentinels. - An older version of the body text exists for v iff v has the tempBodyString attribute. It is *essential* not to create this attribute until finalizing v. The read code warns (creates a "Recovered Nodes" node) if the previous value of v.tempBodyString does not match ''.join(tempBodyList) when v is terminated. - The read code for new sentinels creates nodes using the node-level stars, by making the new node at level N a child of of the previous node at level N-1. Other notes. - Leo no longer maintains the "spelling" of whitespace before embedding constructs. This can never cause any harm. - Leo does not write @nonl or @nl sentinels when writing new sentinels. In effect, this "regularizes" body text so that it always ends with at least one blank. Again, this can never cause any harm, because nodes must be terminated (in the external file), by a newline the precedes the next sentinel. Eliminating @nonl and @nl sentinels simplifies the appearance of the external file an reduces spurious sccs diffs. - Leo always writes private @shadow files using old sentines. This guarantees permanent compatibility with older versions of Leo. -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
