parsing comments in scripts
Dar Scott
dsc at swcp.com
Sun Dec 12 01:32:36 EST 2004
On Dec 11, 2004, at 12:33 PM, Alex Tweedly wrote:
> I just think it should do what it says in the docs - make all the code
> between that line and the
> end myHandler be ignored / have no effect, equivalent to
> "block-commenting" the whole handler.
I'm not comfortable with this.
To do this, it would have to ignore everything from the commented out
'on' or 'function' line down to the 'end', including 'local', 'global'
and 'constant' lines. To do this, it would have to know the line is a
commented out 'on' or 'function'. To do this, it would have to look
inside and parse the contents of comments. This violates the trust
between the compiler and me. That which is in a comment belongs to me.
And besides, what if I have a temporary first line commented out, or
for some reason include "on Christmas morning" in some line of a
comment.
It is straightforward to select the entire handler and select "Comment"
from the script menu. An alternative might be to temporarily change
the spelling of the name.
Dar
More information about the use-livecode
mailing list