lua-users home
lua-l archive

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

> Eric, your patch could likely be salvaged if it were to concatenate adjacent
> strings only when they are preceded by an open parenthesis:

Yes, but this is not as general as possible, because it'd not work for
things like this:
	a(1,"x" "y",2)

You could think that it'd be ok to concatenate adjacent that occur
inside a parenthesis, but that does not work in this case:
	a(1,f"x" "y")

> I think that would be do-able entirely in the lexer

So, no, I don't think it's possible. The only way out seems to me to add
a lex-time string concatenation operator, say &:
	a(1,f"x" & "y")

But I find & heavy and ugly. I find· (· in HTML) much nicer,
but it is harder to type.