aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lparser.c b/lparser.c
index e967ad88..a30c3777 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 1.24 1999/02/25 19:13:56 roberto Exp roberto $ 2** $Id: lparser.c,v 1.25 1999/02/26 15:48:55 roberto Exp roberto $
3** LL(1) Parser and code generator for Lua 3** LL(1) Parser and code generator for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -534,7 +534,7 @@ static void func_onstack (LexState *ls, FuncState *func) {
534} 534}
535 535
536 536
537static void init_state (LexState *ls, FuncState *fs, TaggedString *filename) { 537static void init_state (LexState *ls, FuncState *fs, TaggedString *source) {
538 TProtoFunc *f = luaF_newproto(); 538 TProtoFunc *f = luaF_newproto();
539 fs->prev = ls->fs; /* linked list of funcstates */ 539 fs->prev = ls->fs; /* linked list of funcstates */
540 ls->fs = fs; 540 ls->fs = fs;
@@ -544,7 +544,7 @@ static void init_state (LexState *ls, FuncState *fs, TaggedString *filename) {
544 fs->nupvalues = 0; 544 fs->nupvalues = 0;
545 fs->lastsetline = 0; 545 fs->lastsetline = 0;
546 fs->f = f; 546 fs->f = f;
547 f->fileName = filename; 547 f->source = source;
548 fs->pc = 0; 548 fs->pc = 0;
549 f->code = NULL; 549 f->code = NULL;
550 fs->nvars = (L->debug) ? 0 : -1; /* flag no debug information? */ 550 fs->nvars = (L->debug) ? 0 : -1; /* flag no debug information? */
@@ -828,7 +828,7 @@ static int funcname (LexState *ls, vardesc *v) {
828static void body (LexState *ls, int needself, int line) { 828static void body (LexState *ls, int needself, int line) {
829 /* body -> '(' parlist ')' chunk END */ 829 /* body -> '(' parlist ')' chunk END */
830 FuncState newfs; 830 FuncState newfs;
831 init_state(ls, &newfs, ls->fs->f->fileName); 831 init_state(ls, &newfs, ls->fs->f->source);
832 newfs.f->lineDefined = line; 832 newfs.f->lineDefined = line;
833 check(ls, '('); 833 check(ls, '(');
834 if (needself) 834 if (needself)
@@ -1140,7 +1140,7 @@ static int funcparams (LexState *ls, int slf) {
1140 luaX_error(ls, "function arguments expected"); 1140 luaX_error(ls, "function arguments expected");
1141 break; 1141 break;
1142 } 1142 }
1143 code_byte(fs, CALLFUNC); 1143 code_byte(fs, CALL);
1144 code_byte(fs, 0); /* save space for nresult */ 1144 code_byte(fs, 0); /* save space for nresult */
1145 code_byte(fs, (Byte)(nparams+slf)); 1145 code_byte(fs, (Byte)(nparams+slf));
1146 return fs->pc-1; 1146 return fs->pc-1;