[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Compile checked string constants
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 7 Jun 2018 09:46:43 -0300
> Why not add something like this to Lua 5.4 ?
If you want to experiment with this idea, my ltokenp tool may be
useful. See http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/index.html#ltokenp
With ltokenp, you could remove "const name" from the source and build
a table of strings which would then be compared to table fields, that
is, identifiers after '.' or literal strings after '[', for instance.
Not a syntactical solution but perhaps good enough for testing the idea.