[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Lua 5.0 alpha long string quirk
- From: Björn De Meyer <bjorn.demeyer@...>
- Date: Fri, 23 Aug 2002 23:07:36 +0200
Suppose I want to print the string following
three line string in lua:
How are you?
Then it's impossible to do this using the
following single long string:
How are you?]]]]
As the two final brackets will be added in the string.
The lua lexer tries to balance opening [[ with ]],
to allow for nesting comments. However, this balancing
has some quirky effects when using [[ in such a long string.
It's a a minor quirk that I wanted to point out. Maybe it
would be better not to try and match the [] brackets?
Or only match[[ bracets with ]] when in a comment?
"No one knows true heroes, for they speak not of their greatness." --
Björn De Meyer