lua-users home
lua-l archive

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

  The same is true for C style comments.  /* "Hello */ world" */ will
also generate an error.  In fact, the syntactic keyword coloring in VC++
will correctly color the text to show the comment ends after Hello.

  That is the desired behavior.  When I comment out a block of
something, I shouldn't have to be concerned about the syntax within that
block - in other words my comment should be absolute, even if there is a
stray quotation mark or other syntax errors within it.  Not only does
this make defining and implementing the behavior simpler, but it places
the comment syntax completely outside of the structure of the language.

  Dan East

-----Original Message-----
From: On Behalf Of Philippe Lhoste

You take it the way around, the problem isn't comments inside strings, 
but strings inside comments.

a = "x ]] y"; print(a)

it works, it is perfectly valid.

Now, takes:

x = [[
a = "x ]] y"; print(a)