|
Thanks ... and yes, this ( https://github.com/lua/lua/blob/master/llex.c#L476
) is exactly what I was looking for.
Now knowing this I ask myself how did it come, that I haven't came
up with the idea to look for the pattern `'['` myself wondering
how can it be that there is no `[[` pattern in the C-source code
...
The Lua lexer goes byte by byte and is not using regular
_expression_ patterns or two or more byte patterns I have falsely
somehow assumed that it does because of the answer to the latest
question here on the list about long and short comments which
mentioned the pattern `[=*[` in the context of detecting long
comments ... this somehow resulted in my mind in a wrong
assumption leading to the asked question.
Claudio
On Oct 2, 2023 at 12:25 +0300, Claudio Grondi <claudio.grondi@freenet.de>, wrote:
Lua provides support for multi-line string literals invoked by `[[` and
finalized with `]]` and for multi-line comments invoked with `--[[`,
`--[=[`, ...
I have searched Lua C-code for `--[[`, `--[=` and `[[` but failed to
find this patterns which I would like to replace for custom purposes
with another ones.
Any hints towards where to look and what to change?