A little update.
And beware of the mail wraps

On 20 Mar 2006, at 10:50, Wouter wrote:

-snip-

/* this is a comment
#as is this */function removeBlockComments pText   --toggle the #
put true into tFlag
repeat for each line i in pText
  if char 1 to 2 of word 1 of i = "/*"  then
    put false into tFlag
  end if
if tFlag and token 1 of i is among the items of "on,function,setprop,getprop" then put token 1 to -1 of i & cr after tList

  else if tFlag = false then
    if char 1 of word 1 of i is "#" and "*/" is in i then
      put true into tFlag
      get  "/*" &i
if tFlag and token 1 of it is among the items of "on,function,setprop,getprop" then
        put token 1 to -1 of  it & cr after tList
        next repeat
      end if
    end if
    repeat for each token j in i
      if j is "*/"  then
        put true into tFlag
        get  "/*" &i
if tFlag and token 1 of it is among the items of "on,function,setprop,getprop" then
          put token 1 to -1 of  it & cr after tList
          exit repeat
        end if
      end if
    end repeat
  end if
end repeat
return tList
end removeBlockComments


Greetings,
Wouter


_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to