parsing comments in scripts

Alex Tweedly alex at tweedly.net
Fri Dec 10 15:19:20 EST 2004


At 05:29 10/12/2004 -0800, Richard Gaskin wrote:

>Make that three:  recently (v2.5?) they added support for multiline 
>C-style comments: /* */

I love it when you get two, very different ways to create comments, and 
they can interact

Any votes for how to interpret
put "asd" & /* comment -- this here */ "def " into msg

Choices are
1. The /* starts a comment, so the -- is part of that comment, and the */ 
ends it; i.e. it is   equivalent to       put "asd" & "def" into msg

2. The /* starts a comment, AND the -- starts a comment and everything 
after that is part of a comment - all the way to the end of the line.

The script interpreter thinks version 1, while the script colorizer thinks 
something very close to 2.
Sometimes it colors everything from the /* to the end of the line as a 
comment; other times it colors the /* and -- onwards (but not the word comment)

-- Alex.


More information about the use-livecode mailing list