>
>
>
> I just used @delims the other day for a Windows command file.  In cmd 
> files I use "::" as a comment marker.  I didn't find a Leo file type for 
> cmd files, so I just went ahead and used the directive.  
>

Ok, this is a valid use case, though I didn't object this kind of 
usage.This kind of directives may be skipped when writing external file. 
Which delimiters were used to write external file can (and should) be 
deduced from *@+leo* sentinel line. If those delimiters don't match 
delimiters defined for this file extension (or if there are no defaults 
like in your case), the *@delims* directive can be automatically added to 
the top level body. That way we could prevent a possibility of having 
different pairs of delimiters in a single external file. A possibility to 
create such ambiguous file is the main reason why these directives are 
considered dangerous. Handling them during the process of parsing the 
external file content makes this code complex. And I can't think of a valid 
use case for this kind of situation.

Delimiters are used in order to allow Leo sentinels to be written in the 
external file as a comment lines using the proper syntax for the given 
file. If we have two *@delims* directives with the different values inside 
one external file, this file can't be syntactically correct.

I am not against letting user to choose which delimiters to use for any 
given file. I am just suggesting that this choice should be limited to one 
set of delimiters per file. If we agree on this limitation, then the *@delims 
*directive can be used but it doesn't have to be written in the external 
file. If it is necessary (i.e. if it clashes with the default delimiters), 
then reading code would add it automatically in the top level body. Or 
perhaps it can be written just as a  flag in the *@+leo* sentinel signaling 
only that this directive was (or was not) present in the top level body. 
The delimiters deduced from the *@+leo *should be used for the entire file.

I hope I made my point a bit more clear.

Vitalije

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/aed1ad6e-d268-4cde-b467-2dc22fce0069o%40googlegroups.com.

Reply via email to