aboutsummaryrefslogtreecommitdiff
path: root/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'lex.c')
-rw-r--r--lex.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lex.c b/lex.c
index 3b24857d..6c1f2ac5 100644
--- a/lex.c
+++ b/lex.c
@@ -1,4 +1,4 @@
1char *rcs_lex = "$Id: lex.c,v 2.18 1995/10/06 13:10:53 roberto Exp roberto $"; 1char *rcs_lex = "$Id: lex.c,v 2.19 1995/10/13 15:16:25 roberto Exp roberto $";
2 2
3 3
4#include <ctype.h> 4#include <ctype.h>
@@ -148,6 +148,10 @@ static int read_long_string (void)
148int yylex (void) 148int yylex (void)
149{ 149{
150 float a; 150 float a;
151 static int linelasttoken = 0;
152 if (lua_debug)
153 luaI_codedebugline(linelasttoken);
154 linelasttoken = lua_linenumber;
151 while (1) 155 while (1)
152 { 156 {
153 yytextLast = yytext; 157 yytextLast = yytext;
@@ -159,7 +163,7 @@ int yylex (void)
159 case EOF: 163 case EOF:
160 case 0: 164 case 0:
161 return 0; 165 return 0;
162 case '\n': lua_linenumber++; 166 case '\n': linelasttoken = ++lua_linenumber;
163 case ' ': 167 case ' ':
164 case '\r': /* CR: to avoid problems with DOS/Windows */ 168 case '\r': /* CR: to avoid problems with DOS/Windows */
165 case '\t': 169 case '\t':