|
Enrico Colombini wrote:
On Friday 18 June 2004 16:54, Luiz Henrique de Figueiredo wrote:Lua 5.1 will bring a more general long comment: --[****[ ... ]****]Well, it's not exactly elegant... Enrico
And it will be hard to syntax hightlight correctly in SciTE, since we either have to store somewhere the number of stars, or to backtrack the source to find the start of the comment. This while still managing nested comments...
Of course, this concern isn't the problem of Lua authors.I believe the original idea is to cope with all cases, since anything can go into the comments, increasing the number of stars should dodge similar strings inside.
--[[ ]]-- is nice by its symetry, but one can imagine some cases where it can fail. A bit articifial, but still possible:
--[[ myC_Code = "x = a[b[i]]--" ]]-- Glups... -- --=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=-- Philippe Lhoste (Paris -- France) Professional programmer and amateur artist http://Phi.Lho.free.fr --=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--