mirror of
https://github.com/lua/lua.git
synced 2025-02-04 06:13:04 +08:00
Acrescentar o gerenciador de memoria "mm" e corrigir um bug pois
no novo "lex" o token FUNCTION nao tem valor associado.
This commit is contained in:
parent
3577eb6f13
commit
ea1a7a6b27
6
lua.stx
6
lua.stx
@ -1,11 +1,13 @@
|
|||||||
%{
|
%{
|
||||||
|
|
||||||
char *rcs_luastx = "$Id: lua.stx,v 1.3 1993/12/28 16:42:29 roberto Exp roberto $";
|
char *rcs_luastx = "$Id: lua.stx,v 1.4 1994/02/13 20:38:20 roberto Exp celes $";
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "mm.h"
|
||||||
|
|
||||||
#include "opcode.h"
|
#include "opcode.h"
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
#include "inout.h"
|
#include "inout.h"
|
||||||
@ -240,7 +242,7 @@ function : FUNCTION NAME {pc=basepc=code; nlocalvar=0;} '(' parlist ')'
|
|||||||
{
|
{
|
||||||
align(Word,1);
|
align(Word,1);
|
||||||
code_byte(SETFUNCTION);
|
code_byte(SETFUNCTION);
|
||||||
code_word($1);
|
code_word(lua_nfile-1);
|
||||||
code_word($2);
|
code_word($2);
|
||||||
}
|
}
|
||||||
lua_codeadjust (0);
|
lua_codeadjust (0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user