lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




How about:

The TERMINATOR may never contains ']]'.

This will make single line things work (as above) and:

--[[
multiline comment
my favorite style :)
]]--

(the terminating -- is of course optional, but I like them for visual symmetry :)

--[[my.html
<HTTP>...whatever
my.html]]

If one wants, '*'s can be used as terminators:

--[[***
***]]


Philippe Lhoste wrote:

Mmmm, not so bright, it is incompatible with simple use of this string, like:
path = [[C:\Good Languages\Lua\Bright Script.lua]]

unless we make additional rules like:

Single line literal strings/comments use old syntax, multiline ones always starts with new line or HereDoc terminator.

Or we use foo = [[[TERMINATOR
but I like it less (more exceptions).