diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-10-08 15:46:08 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-10-08 15:46:08 -0300 |
commit | b3d0682fb94f56a438dbb4fdb2b3440ccc10cfb4 (patch) | |
tree | 746fc9900768dfaf1ddffca35cb4f6fd55903bbf /lparser.c | |
parent | 02afc892d5ce5d85e88faac443d7294589ee697a (diff) | |
download | lua-b3d0682fb94f56a438dbb4fdb2b3440ccc10cfb4.tar.gz lua-b3d0682fb94f56a438dbb4fdb2b3440ccc10cfb4.tar.bz2 lua-b3d0682fb94f56a438dbb4fdb2b3440ccc10cfb4.zip |
use of different buffers for scanner and concatenation
Diffstat (limited to 'lparser.c')
-rw-r--r-- | lparser.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 1.193 2002/08/22 19:51:08 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.194 2002/08/30 19:09:21 roberto Exp roberto $ |
3 | ** Lua Parser | 3 | ** Lua Parser |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -351,9 +351,10 @@ static void close_func (LexState *ls) { | |||
351 | } | 351 | } |
352 | 352 | ||
353 | 353 | ||
354 | Proto *luaY_parser (lua_State *L, ZIO *z) { | 354 | Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff) { |
355 | struct LexState lexstate; | 355 | struct LexState lexstate; |
356 | struct FuncState funcstate; | 356 | struct FuncState funcstate; |
357 | lexstate.buff = buff; | ||
357 | luaX_setinput(L, &lexstate, z, luaS_new(L, zname(z))); | 358 | luaX_setinput(L, &lexstate, z, luaS_new(L, zname(z))); |
358 | open_func(&lexstate, &funcstate); | 359 | open_func(&lexstate, &funcstate); |
359 | next(&lexstate); /* read first token */ | 360 | next(&lexstate); /* read first token */ |