aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/llex.c b/llex.c
index 31b4ce85..2a4d8404 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 2.87 2014/10/30 18:53:28 roberto Exp roberto $ 2** $Id: llex.c,v 2.88 2014/11/02 19:19:04 roberto Exp roberto $
3** Lexical Analyzer 3** Lexical Analyzer
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -156,12 +156,13 @@ static void inclinenumber (LexState *ls) {
156 if (currIsNewline(ls) && ls->current != old) 156 if (currIsNewline(ls) && ls->current != old)
157 next(ls); /* skip '\n\r' or '\r\n' */ 157 next(ls); /* skip '\n\r' or '\r\n' */
158 if (++ls->linenumber >= MAX_INT) 158 if (++ls->linenumber >= MAX_INT)
159 luaX_syntaxerror(ls, "chunk has too many lines"); 159 lexerror(ls, "chunk has too many lines", 0);
160} 160}
161 161
162 162
163void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, TString *source, 163void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, TString *source,
164 int firstchar) { 164 int firstchar) {
165 ls->t.token = 0;
165 ls->decpoint = '.'; 166 ls->decpoint = '.';
166 ls->L = L; 167 ls->L = L;
167 ls->current = firstchar; 168 ls->current = firstchar;