[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: String access & metamethods
- From: "Jerome Vuarand" <jerome.vuarand@...>
- Date: Thu, 13 Dec 2007 10:15:47 -0500
Luiz Henrique de Figueiredo wrote:
>> (I don't know if a token filter can distinguish between the two, but
>> that would be a nice addition if it doesn't).
>
> It can't because, by definition, it seems strings *after* the lexer
> has turned text into tokens. All strings are the same, regardless of
> what text form was used to define them. --lhf
Would it be computationally expensive to have the tokenizer generate
three different tokens (maybe more if you want to distinguish [[]] from
[=[]=]), and just have the parser treat them equally ? In plain Lua this
would have no purpose, but in a token filtered Lua it could be useful
like in that translation case.