lua-users home
lua-l archive

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


> instead of:
> `--[[[[[        third level styled text comment    ]]]]]`

As Tom already pointed out, that creates some ambiguities if we try
to enclose text starting or ending with square bracktes.


> or
> `--['''[        third level styled text comment    ]''']`

Compare:  a = x['']  versus  a = x[''[. We need some look-ahead to
distinguish them.


> or
> `--[...[        third level styled text comment    ]...]`

Again, compare: a = x[...]  versus a = x[...[.

That said, '=' is as good as any other character that cannot follow
'[' in regular Lua code. (Better yet if it cannot come before ']').

Well, its symmetry is also a plus:

  [>>>] text [>>>]  ??  [>>>[ text ]<<<]
  [///] text [///]  ??  [///[ text ]\\\]

  [***[ text ]***]    Sounds good

-- Roberto