parsing comments in scripts

Mark Wieder mwieder at ahsoftware.net
Sun Dec 12 13:27:57 EST 2004


Alex-

Friday, December 10, 2004, 11:26:15 AM, you wrote:

AT> function StripComments theLine
AT>    local theResult
AT>    put token 1 to -1 of theLine into theResult
AT>     if quote is in token -2 to -1 of theLine then put quote after theResult
AT>    return theResult
AT> end StripComents

Thanks for that. It pretty much does the job for me, although I have
to handle C-style comments and line-continuation characters externally
before the tokenizer has a chance to work.

-- 
-Mark Wieder
 mwieder at ahsoftware.net



More information about the use-livecode mailing list