diff options
Diffstat (limited to '')
| -rw-r--r-- | lex.c | 7 |
1 files changed, 4 insertions, 3 deletions
| @@ -1,4 +1,4 @@ | |||
| 1 | char *rcs_lex = "$Id: lex.c,v 2.38 1996/11/08 12:20:34 roberto Exp roberto $"; | 1 | char *rcs_lex = "$Id: lex.c,v 2.38 1996/11/08 12:49:35 roberto Exp roberto $"; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | #include <ctype.h> | 4 | #include <ctype.h> |
| @@ -36,7 +36,7 @@ void luaI_syntaxerror (char *s) | |||
| 36 | char *token = luaI_buffer(1); | 36 | char *token = luaI_buffer(1); |
| 37 | if (token[0] == 0) | 37 | if (token[0] == 0) |
| 38 | token = "<eof>"; | 38 | token = "<eof>"; |
| 39 | sprintf (msg,"%s; last token read: \"%s\" at line %d in file `%s'", | 39 | sprintf (msg,"%s;\n> last token read: \"%s\" at line %d in file %s", |
| 40 | s, token, lua_linenumber, lua_parsedfile); | 40 | s, token, lua_linenumber, lua_parsedfile); |
| 41 | lua_error (msg); | 41 | lua_error (msg); |
| 42 | } | 42 | } |
| @@ -80,6 +80,7 @@ void luaI_addReserved (void) | |||
| 80 | 80 | ||
| 81 | static int inclinenumber (int pragma_allowed) | 81 | static int inclinenumber (int pragma_allowed) |
| 82 | { | 82 | { |
| 83 | ++lua_linenumber; | ||
| 83 | if (pragma_allowed && current == '$') { /* is a pragma? */ | 84 | if (pragma_allowed && current == '$') { /* is a pragma? */ |
| 84 | char *buff = luaI_buffer(MINBUFF+1); | 85 | char *buff = luaI_buffer(MINBUFF+1); |
| 85 | int i = 0; | 86 | int i = 0; |
| @@ -96,7 +97,7 @@ static int inclinenumber (int pragma_allowed) | |||
| 96 | lua_debug = 0; | 97 | lua_debug = 0; |
| 97 | else luaI_syntaxerror("invalid pragma"); | 98 | else luaI_syntaxerror("invalid pragma"); |
| 98 | } | 99 | } |
| 99 | return ++lua_linenumber; | 100 | return lua_linenumber; |
| 100 | } | 101 | } |
| 101 | 102 | ||
| 102 | static int read_long_string (char *yytext, int buffsize) | 103 | static int read_long_string (char *yytext, int buffsize) |
