 ustor
Member
|
When . is used between identifiers as a lookup, it instead becomes a part of the identifier. It is clearly an operator (alias for ) but is not treated as such. Is this intentional behavior or just an oversight?
|
 simon
Key Master
|
It’s not intentional on my part, but I didn’t write the lexer for LUA! You could provide some sample code and screen shots showing the error, and if it’s simple I’ll fix it and otherwise I’ll report a bug in Scintilla.
|
 ustor
Member
|
Demonstrates current dot behavior (screenshot):
function example()
local s = "string" .. "concat"; -- .. operator spaced between strings
local c = "string".."concat"; -- .. operator unspaced between strings
local p = "He walked." -- not an operator, assimilated into string
local d = 10.2; -- not an operator, assimilated into number
local pos = { x = 0, y = 0 };
pos . x = 1; -- . operator spaced between identifiers
pos.y = 1; -- . operator unspaced between identifiers (this case fails)
end
On the final line of the function (pos.y = 1) the . should retain the operator color (red), but instead assumes the identifier color (white).
|