[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Proposal: improvement of string.gsub()
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 20 Apr 2005 12:56:46 -0300
> Of course, the best would be if the Lua parser is capable of making
> consecutive concat's into a single '__concat()' method call (with
> multiple arguments).
The Lua parser already handles consecutive concat's:
$ cat i
return a..b..c..d
$ luac -p -l i
main <i:0> (7 instructions, 28 bytes at 0x805af90)
0 params, 4 stacks, 0 upvalues, 0 locals, 4 constants, 0 functions
1 [1] GETGLOBAL 0 0 ; a
2 [1] GETGLOBAL 1 1 ; b
3 [1] GETGLOBAL 2 2 ; c
4 [1] GETGLOBAL 3 3 ; d
5 [1] CONCAT 0 0 3
6 [1] RETURN 0 2 0
7 [1] RETURN 0 1 0
--lhf