lua-users home
lua-l archive

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


Hi,

Here is a short Lua input:
local function name_s ( ) --[aaa
end
The Lua implementation accepts the input as valid. With the comment section "--[aaa" seemingly treated as a short comment.

However, from the spec, I see that the comment is not supposed to be parsed as a short comment, because the text immediately after "--" is an opening long bracket. Likewise, the comment can't be parsed as a valid long comment, since there is no corresponding closing long bracket.

Should Lua return an error in this case? Or did I get that wrong?

Regards,
Bachir